See changelog (updated later)
[Packages/TYPO3.CMS.git] / typo3 / wizard_table.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2004 Kasper Skaarhoj (kasper@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 * Wizard to help make tables (eg. for tt_content elements) of type "table".
29 * Each line is a table row, each cell divided by a |
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
33 * XHTML compliant
34 *
35 * @author Kasper Skaarhoj <kasper@typo3.com>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 84: class SC_wizard_table
43 * 112: function init()
44 * 150: function main()
45 * 166: function printContent()
46 * 175: function tableWizard()
47 *
48 * SECTION: Helper functions
49 * 214: function getConfigCode($row)
50 * 280: function getTableHTML($cfgArr,$row)
51 * 429: function changeFunc()
52 * 545: function cfgArray2CfgString($cfgArr)
53 * 576: function cfgString2CfgArray($cfgStr,$cols)
54 *
55 * TOTAL FUNCTIONS: 9
56 * (This index is automatically created/updated by the extension "extdeveval")
57 *
58 */
59
60
61
62 $BACK_PATH='';
63 require ('init.php');
64 require ('template.php');
65 $LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
66
67
68
69
70
71
72
73
74
75
76
77 /**
78 * Script Class for rendering the Table Wizard
79 *
80 * @author Kasper Skaarhoj <kasper@typo3.com>
81 * @package TYPO3
82 * @subpackage core
83 */
84 class SC_wizard_table {
85
86 // Internal, dynamic:
87 var $doc; // Document template object
88 var $content; // Content accumulation for the module.
89 var $include_once=array(); // List of files to include.
90 var $inputStyle=0; // True, then <input> fields are shown, not textareas.
91
92
93 // Internal, static:
94 var $xmlStorage=0; // If set, the string version of the content is interpreted/written as XML instead of the original linebased kind. This variable still needs binding to the wizard parameters - but support is ready!
95 var $colsFieldName='cols'; // Name of field in parent record which MAY contain the number of columns for the table - here hardcoded to the value of tt_content. Should be set by TCEform parameters (from P)
96
97
98 // Internal, static: GPvars
99 var $P; // Wizard parameters, coming from TCEforms linking to the wizard.
100 var $TABLECFG; // The array which is constantly submitted by the multidimensional form of this wizard.
101
102
103
104
105
106
107 /**
108 * Initialization of the class
109 *
110 * @return void
111 */
112 function init() {
113 global $BACK_PATH;
114
115 // GPvars:
116 $this->P = t3lib_div::_GP('P');
117 $this->TABLECFG = t3lib_div::_GP('TABLE');
118
119 // Setting options:
120 $this->xmlStorage = $this->P['params']['xmlOutput'];
121
122 // Textareas or input fields:
123 $this->inputStyle=isset($this->TABLECFG['textFields']) ? $this->TABLECFG['textFields'] : 1;
124
125 // Document template object:
126 $this->doc = t3lib_div::makeInstance('mediumDoc');
127 $this->doc->docType = 'xhtml_trans';
128 $this->doc->backPath = $BACK_PATH;
129 $this->doc->JScode=$this->doc->wrapScriptTags('
130 function jumpToUrl(URL,formEl) { //
131 document.location = URL;
132 }
133 ');
134
135 // Setting form tag:
136 list($rUri) = explode('#',t3lib_div::getIndpEnv('REQUEST_URI'));
137 $this->doc->form ='<form action="'.htmlspecialchars($rUri).'" method="post" name="wizardForm">';
138
139 // Start page:
140 $this->content.=$this->doc->startPage('Table');
141
142 // If save command found, include tcemain:
143 if ($_POST['savedok_x'] || $_POST['saveandclosedok_x']) {
144 $this->include_once[]=PATH_t3lib.'class.t3lib_tcemain.php';
145 }
146 }
147
148 /**
149 * Main function, rendering the table wizard
150 *
151 * @return void
152 */
153 function main() {
154 global $LANG;
155
156 if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
157 $this->content.=$this->doc->section($LANG->getLL('table_title'),$this->tableWizard(),0,1);
158 } else {
159 $this->content.=$this->doc->section($LANG->getLL('table_title'),'<span class="typo3-red">'.$LANG->getLL('table_noData',1).'</span>',0,1);
160 }
161 $this->content.=$this->doc->endPage();
162 }
163
164 /**
165 * Outputting the accumulated content to screen
166 *
167 * @return void
168 */
169 function printContent() {
170 echo $this->content;
171 }
172
173 /**
174 * Draws the table wizard content
175 *
176 * @return string HTML content for the form.
177 */
178 function tableWizard() {
179
180 // First, check the references by selecting the record:
181 $row=t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
182 if (!is_array($row)) {
183 t3lib_BEfunc::typo3PrintError ('Wizard Error','No reference to record',0);
184 exit;
185 }
186
187 // This will get the content of the form configuration code field to us - possibly cleaned up, saved to database etc. if the form has been submitted in the meantime.
188 $tableCfgArray = $this->getConfigCode($row);
189
190 // Generation of the Table Wizards HTML code:
191 $content = $this->getTableHTML($tableCfgArray,$row);
192
193 // Return content:
194 return $content;
195 }
196
197
198
199
200
201
202
203 /***************************
204 *
205 * Helper functions
206 *
207 ***************************/
208
209 /**
210 * Will get and return the configuration code string
211 * Will also save (and possibly redirect/exit) the content if a save button has been pressed
212 *
213 * @param array Current parent record row
214 * @return array Table config code in an array
215 * @access private
216 */
217 function getConfigCode($row) {
218
219 // If some data has been submitted, then construct
220 if (isset($this->TABLECFG['c'])) {
221
222 // Process incoming:
223 $this->changeFunc();
224
225
226 // Convert to string (either line based or XML):
227 if ($this->xmlStorage) {
228 // Convert the input array to XML:
229 $bodyText = t3lib_div::array2xml($this->TABLECFG['c'],'',0,'T3TableWizard');
230
231 // Setting cfgArr directly from the input:
232 $cfgArr = $this->TABLECFG['c'];
233 } else {
234 // Convert the input array to a string of configuration code:
235 $bodyText = $this->cfgArray2CfgString($this->TABLECFG['c']);
236
237 // Create cfgArr from the string based configuration - that way it is cleaned up and any incompatibilities will be removed!
238 $cfgArr = $this->cfgString2CfgArray($bodyText,$row[$this->colsFieldName]);
239 }
240
241 // If a save button has been pressed, then save the new field content:
242 if ($_POST['savedok_x'] || $_POST['saveandclosedok_x']) {
243
244 // Make TCEmain object:
245 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
246 $tce->stripslashes_values=0;
247
248 // Put content into the data array:
249 $data=array();
250 $data[$this->P['table']][$this->P['uid']][$this->P['field']]=$bodyText;
251
252 // Perform the update:
253 $tce->start($data,array());
254 $tce->process_datamap();
255
256 // If the save/close button was pressed, then redirect the screen:
257 if ($_POST['saveandclosedok_x']) {
258 header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl']));
259 exit;
260 }
261 }
262 } else { // If nothing has been submitted, load the $bodyText variable from the selected database row:
263 if ($this->xmlStorage) {
264 $cfgArr = t3lib_div::xml2array($row[$this->P['field']]);
265 } else { // Regular linebased table configuration:
266 $cfgArr = $this->cfgString2CfgArray($row[$this->P['field']],$row[$this->colsFieldName]);
267 }
268 $cfgArr = is_array($cfgArr) ? $cfgArr : array();
269 }
270
271 return $cfgArr;
272 }
273
274 /**
275 * Creates the HTML for the Table Wizard:
276 *
277 * @param array Table config array
278 * @param array Current parent record array
279 * @return string HTML for the table wizard
280 * @access private
281 */
282 function getTableHTML($cfgArr,$row) {
283 global $LANG;
284
285 // Traverse the rows:
286 $tRows=array();
287 $k=0;
288 foreach($cfgArr as $cellArr) {
289 if (is_array($cellArr)) {
290 // Initialize:
291 $cells=array();
292 $a=0;
293
294 // Traverse the columns:
295 foreach($cellArr as $cellContent) {
296 if ($this->inputStyle) {
297 $cells[]='<input type="text"'.$this->doc->formWidth(20).' name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']" value="'.htmlspecialchars($cellContent).'" />';
298 } else {
299 $cellContent=eregi_replace('<br[ ]?[\/]?>',chr(10),$cellContent);
300 $cells[]='<textarea '.$this->doc->formWidth(20).' rows="5" name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']">'.t3lib_div::formatForTextarea($cellContent).'</textarea>';
301 }
302
303 // Increment counter:
304 $a++;
305 }
306
307 // CTRL panel for a table row (move up/down/around):
308 $onClick="document.wizardForm.action+='#ANC_".(($k+1)*2-2)."';";
309 $onClick=' onclick="'.htmlspecialchars($onClick).'"';
310 $ctrl='';
311
312 $brTag=$this->inputStyle?'':'<br />';
313 if ($k!=0) {
314 $ctrl.='<input type="image" name="TABLE[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2up.gif','').$onClick.' title="'.$LANG->getLL('table_up',1).'" />'.$brTag;
315 } else {
316 $ctrl.='<input type="image" name="TABLE[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_up.gif','').$onClick.' title="'.$LANG->getLL('table_bottom',1).'" />'.$brTag;
317 }
318 $ctrl.='<input type="image" name="TABLE[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').$onClick.' title="'.$LANG->getLL('table_removeRow',1).'" />'.$brTag;
319
320 if (($k+1)!=count($tLines)) {
321 $ctrl.='<input type="image" name="TABLE[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2down.gif','').$onClick.' title="'.$LANG->getLL('table_down',1).'" />'.$brTag;
322 } else {
323 $ctrl.='<input type="image" name="TABLE[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_down.gif','').$onClick.' title="'.$LANG->getLL('table_top',1).'" />'.$brTag;
324 }
325 $ctrl.='<input type="image" name="TABLE[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').$onClick.' title="'.$LANG->getLL('table_addRow',1).'" />'.$brTag;
326
327 $tRows[]='
328 <tr class="bgColor4">
329 <td class="bgColor5"><a name="ANC_'.(($k+1)*2).'"></a><span class="c-wizButtonsV">'.$ctrl.'</span></td>
330 <td>'.implode('</td>
331 <td>',$cells).'</td>
332 </tr>';
333
334 // Increment counter:
335 $k++;
336 }
337 }
338
339 // CTRL panel for a table column (move left/right/around/delete)
340 $cells=array();
341 $cells[]='';
342 // Finding first row:
343 reset($cfgArr);
344 $firstRow=current($cfgArr);
345 if (is_array($firstRow)) {
346
347 // Init:
348 $a=0;
349 $cols=count($firstRow);
350
351 // Traverse first row:
352 foreach($firstRow as $temp) {
353 $ctrl='';
354 if ($a!=0) {
355 $ctrl.='<input type="image" name="TABLE[col_left]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2left.gif','').' title="'.$LANG->getLL('table_left',1).'" />';
356 } else {
357 $ctrl.='<input type="image" name="TABLE[col_end]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_left.gif','').' title="'.$LANG->getLL('table_end',1).'" />';
358 }
359 $ctrl.='<input type="image" name="TABLE[col_remove]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').' title="'.$LANG->getLL('table_removeColumn',1).'" />';
360 if (($a+1)!=$cols) {
361 $ctrl.='<input type="image" name="TABLE[col_right]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2right.gif','').' title="'.$LANG->getLL('table_right',1).'" />';
362 } else {
363 $ctrl.='<input type="image" name="TABLE[col_start]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_right.gif','').' title="'.$LANG->getLL('table_start',1).'" />';
364 }
365 $ctrl.='<input type="image" name="TABLE[col_add]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').' title="'.$LANG->getLL('table_addColumn',1).'" />';
366 $cells[]='<span class="c-wizButtonsH">'.$ctrl.'</span>';
367
368 // Incr. counter:
369 $a++;
370 }
371 $tRows[]='
372 <tr class="bgColor5">
373 <td align="center">'.implode('</td>
374 <td align="center">',$cells).'</td>
375 </tr>';
376 }
377
378 $content = '';
379
380 // Add CSH:
381 $content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'wizard_table_wiz', $GLOBALS['BACK_PATH'],'');
382
383 // Implode all table rows into a string, wrapped in table tags.
384 $content.= '
385
386
387 <!--
388 Table wizard
389 -->
390 <table border="0" cellpadding="0" cellspacing="1" id="typo3-tablewizard">
391 '.implode('',$tRows).'
392 </table>';
393
394 // Add saving buttons in the bottom:
395 $content.= '
396
397 <!--
398 Save buttons:
399 -->
400 <div id="c-saveButtonPanel">';
401 $content.= '<input type="image" class="c-inputButton" name="savedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" />';
402 $content.= '<input type="image" class="c-inputButton" name="saveandclosedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/saveandclosedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc',1).'" />';
403 $content.= '<a href="#" onclick="'.htmlspecialchars('jumpToUrl(unescape(\''.rawurlencode($this->P['returnUrl']).'\')); return false;').'">'.
404 '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/closedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc',1).'" alt="" />'.
405 '</a>';
406 $content.= '<input type="image" class="c-inputButton" name="_refresh"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/refresh_n.gif','').' title="'.$LANG->getLL('forms_refresh',1).'" />';
407 $content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'wizard_table_wiz_buttons', $GLOBALS['BACK_PATH'],'');
408 $content.= '
409 </div>
410 ';
411
412 // Input type checkbox:
413 $content.= '
414
415 <!--
416 Input mode check box:
417 -->
418 <div id="c-inputMode">
419 '.
420 '<input type="hidden" name="TABLE[textFields]" value="0" />'.
421 '<input type="checkbox" name="TABLE[textFields]" value="1"'.($this->inputStyle?' checked="checked"':'').' /> '.
422 $LANG->getLL('table_smallFields').'
423 </div>
424
425 <br /><br />
426 ';
427
428 // Return content:
429 return $content;
430 }
431
432 /**
433 * Detects if a control button (up/down/around/delete) has been pressed for an item and accordingly it will manipulate the internal TABLECFG array
434 *
435 * @return void
436 * @access private
437 */
438 function changeFunc() {
439 if ($this->TABLECFG['col_remove']) {
440 $kk = key($this->TABLECFG['col_remove']);
441 $cmd='col_remove';
442 } elseif ($this->TABLECFG['col_add']) {
443 $kk = key($this->TABLECFG['col_add']);
444 $cmd='col_add';
445 } elseif ($this->TABLECFG['col_start']) {
446 $kk = key($this->TABLECFG['col_start']);
447 $cmd='col_start';
448 } elseif ($this->TABLECFG['col_end']) {
449 $kk = key($this->TABLECFG['col_end']);
450 $cmd='col_end';
451 } elseif ($this->TABLECFG['col_left']) {
452 $kk = key($this->TABLECFG['col_left']);
453 $cmd='col_left';
454 } elseif ($this->TABLECFG['col_right']) {
455 $kk = key($this->TABLECFG['col_right']);
456 $cmd='col_right';
457 } elseif ($this->TABLECFG['row_remove']) {
458 $kk = key($this->TABLECFG['row_remove']);
459 $cmd='row_remove';
460 } elseif ($this->TABLECFG['row_add']) {
461 $kk = key($this->TABLECFG['row_add']);
462 $cmd='row_add';
463 } elseif ($this->TABLECFG['row_top']) {
464 $kk = key($this->TABLECFG['row_top']);
465 $cmd='row_top';
466 } elseif ($this->TABLECFG['row_bottom']) {
467 $kk = key($this->TABLECFG['row_bottom']);
468 $cmd='row_bottom';
469 } elseif ($this->TABLECFG['row_up']) {
470 $kk = key($this->TABLECFG['row_up']);
471 $cmd='row_up';
472 } elseif ($this->TABLECFG['row_down']) {
473 $kk = key($this->TABLECFG['row_down']);
474 $cmd='row_down';
475 }
476
477 if ($cmd && t3lib_div::testInt($kk)) {
478 if (substr($cmd,0,4)=='row_') {
479 switch($cmd) {
480 case 'row_remove':
481 unset($this->TABLECFG['c'][$kk]);
482 break;
483 case 'row_add':
484 $this->TABLECFG['c'][$kk+1]=array();
485 break;
486 case 'row_top':
487 $this->TABLECFG['c'][1]=$this->TABLECFG['c'][$kk];
488 unset($this->TABLECFG['c'][$kk]);
489 break;
490 case 'row_bottom':
491 $this->TABLECFG['c'][10000000]=$this->TABLECFG['c'][$kk];
492 unset($this->TABLECFG['c'][$kk]);
493 break;
494 case 'row_up':
495 $this->TABLECFG['c'][$kk-3]=$this->TABLECFG['c'][$kk];
496 unset($this->TABLECFG['c'][$kk]);
497 break;
498 case 'row_down':
499 $this->TABLECFG['c'][$kk+3]=$this->TABLECFG['c'][$kk];
500 unset($this->TABLECFG['c'][$kk]);
501 break;
502 }
503 ksort($this->TABLECFG['c']);
504 }
505 if (substr($cmd,0,4)=='col_') {
506 reset($this->TABLECFG['c']);
507 while(list($cAK)=each($this->TABLECFG['c'])) {
508 switch($cmd) {
509 case 'col_remove':
510 unset($this->TABLECFG['c'][$cAK][$kk]);
511 break;
512 case 'col_add':
513 $this->TABLECFG['c'][$cAK][$kk+1]='';
514 break;
515 case 'col_start':
516 $this->TABLECFG['c'][$cAK][1]=$this->TABLECFG['c'][$cAK][$kk];
517 unset($this->TABLECFG['c'][$cAK][$kk]);
518 break;
519 case 'col_end':
520 $this->TABLECFG['c'][$cAK][1000000]=$this->TABLECFG['c'][$cAK][$kk];
521 unset($this->TABLECFG['c'][$cAK][$kk]);
522 break;
523 case 'col_left':
524 $this->TABLECFG['c'][$cAK][$kk-3]=$this->TABLECFG['c'][$cAK][$kk];
525 unset($this->TABLECFG['c'][$cAK][$kk]);
526 break;
527 case 'col_right':
528 $this->TABLECFG['c'][$cAK][$kk+3]=$this->TABLECFG['c'][$cAK][$kk];
529 unset($this->TABLECFG['c'][$cAK][$kk]);
530 break;
531 }
532 ksort($this->TABLECFG['c'][$cAK]);
533 }
534 }
535 }
536
537 // Convert line breaks to <br /> tags:
538 reset($this->TABLECFG['c']);
539 while(list($a)=each($this->TABLECFG['c'])) {
540 reset($this->TABLECFG['c'][$a]);
541 while(list($b)=each($this->TABLECFG['c'][$a])) {
542 $this->TABLECFG['c'][$a][$b] = str_replace(chr(10),'<br />',str_replace(chr(13),'',$this->TABLECFG['c'][$a][$b]));
543 }
544 }
545 }
546
547 /**
548 * Converts the input array to a configuration code string
549 *
550 * @param array Array of table configuration (follows the input structure from the table wizard POST form)
551 * @return string The array converted into a string with line-based configuration.
552 * @see cfgString2CfgArray()
553 */
554 function cfgArray2CfgString($cfgArr) {
555
556 // Initialize:
557 $inLines=array();
558
559 // Traverse the elements of the table wizard and transform the settings into configuration code.
560 reset($this->TABLECFG['c']);
561 while(list($a)=each($this->TABLECFG['c'])) {
562 $thisLine=array();
563 reset($this->TABLECFG['c'][$a]);
564 while(list($b)=each($this->TABLECFG['c'][$a])) {
565 $thisLine[]=str_replace('|','',$this->TABLECFG['c'][$a][$b]);
566 }
567 $inLines[]=implode('|',$thisLine);
568 }
569
570 // Finally, implode the lines into a string:
571 $bodyText = implode(chr(10),$inLines);
572
573 // Return the configuration code:
574 return $bodyText;
575 }
576
577 /**
578 * Converts the input configuration code string into an array
579 *
580 * @param string Configuration code
581 * @param integer Default number of columns
582 * @return array Configuration array
583 * @see cfgArray2CfgString()
584 */
585 function cfgString2CfgArray($cfgStr,$cols) {
586
587 // Explode lines in the configuration code - each line is a table row.
588 $tLines=explode(chr(10),$cfgStr);
589
590 // Setting number of columns
591 if (!$cols && trim($tLines[0])) { // auto...
592 $cols = count(explode('|',$tLines[0]));
593 }
594 $cols=$cols?$cols:4;
595
596 // Traverse the number of table elements:
597 $cfgArr=array();
598 foreach($tLines as $k => $v) {
599
600 // Initialize:
601 $vParts = explode('|',$v);
602
603 // Traverse columns:
604 for ($a=0;$a<$cols;$a++) {
605 $cfgArr[$k][$a]=$vParts[$a];
606 }
607 }
608
609 // Return configuration array:
610 return $cfgArr;
611 }
612 }
613
614 // Include extension?
615 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_table.php']) {
616 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_table.php']);
617 }
618
619
620
621
622
623
624
625
626
627
628
629
630 // Make instance:
631 $SOBE = t3lib_div::makeInstance('SC_wizard_table');
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 ?>