More CSH updates
[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 include ('sysext/lang/locallang_wizards.php');
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,$HTTP_POST_VARS;
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 ($HTTP_POST_VARS['savedok_x'] || $HTTP_POST_VARS['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 global $HTTP_POST_VARS;
219
220 // If some data has been submitted, then construct
221 if (isset($this->TABLECFG['c'])) {
222
223 // Process incoming:
224 $this->changeFunc();
225
226
227 // Convert to string (either line based or XML):
228 if ($this->xmlStorage) {
229 // Convert the input array to XML:
230 $bodyText = t3lib_div::array2xml($this->TABLECFG['c'],'',0,'T3TableWizard');
231
232 // Setting cfgArr directly from the input:
233 $cfgArr = $this->TABLECFG['c'];
234 } else {
235 // Convert the input array to a string of configuration code:
236 $bodyText = $this->cfgArray2CfgString($this->TABLECFG['c']);
237
238 // Create cfgArr from the string based configuration - that way it is cleaned up and any incompatibilities will be removed!
239 $cfgArr = $this->cfgString2CfgArray($bodyText,$row[$this->colsFieldName]);
240 }
241
242 // If a save button has been pressed, then save the new field content:
243 if ($HTTP_POST_VARS['savedok_x'] || $HTTP_POST_VARS['saveandclosedok_x']) {
244
245 // Make TCEmain object:
246 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
247 $tce->stripslashes_values=0;
248
249 // Put content into the data array:
250 $data=array();
251 $data[$this->P['table']][$this->P['uid']][$this->P['field']]=$bodyText;
252
253 // Perform the update:
254 $tce->start($data,array());
255 $tce->process_datamap();
256
257 // If the save/close button was pressed, then redirect the screen:
258 if ($HTTP_POST_VARS['saveandclosedok_x']) {
259 header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl']));
260 exit;
261 }
262 }
263 } else { // If nothing has been submitted, load the $bodyText variable from the selected database row:
264 if ($this->xmlStorage) {
265 $cfgArr = t3lib_div::xml2array($row[$this->P['field']]);
266 } else { // Regular linebased table configuration:
267 $cfgArr = $this->cfgString2CfgArray($row[$this->P['field']],$row[$this->colsFieldName]);
268 }
269 $cfgArr = is_array($cfgArr) ? $cfgArr : array();
270 }
271
272 return $cfgArr;
273 }
274
275 /**
276 * Creates the HTML for the Table Wizard:
277 *
278 * @param array Table config array
279 * @param array Current parent record array
280 * @return string HTML for the table wizard
281 * @access private
282 */
283 function getTableHTML($cfgArr,$row) {
284 global $LANG;
285
286 // Traverse the rows:
287 $tRows=array();
288 $k=0;
289 foreach($cfgArr as $cellArr) {
290 if (is_array($cellArr)) {
291 // Initialize:
292 $cells=array();
293 $a=0;
294
295 // Traverse the columns:
296 foreach($cellArr as $cellContent) {
297 if ($this->inputStyle) {
298 $cells[]='<input type="text"'.$this->doc->formWidth(20).' name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']" value="'.htmlspecialchars($cellContent).'" />';
299 } else {
300 $cellContent=eregi_replace('<br[ ]?[\/]?>',chr(10),$cellContent);
301 $cells[]='<textarea '.$this->doc->formWidth(20).' rows="5" name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']">'.t3lib_div::formatForTextarea($cellContent).'</textarea>';
302 }
303
304 // Increment counter:
305 $a++;
306 }
307
308 // CTRL panel for a table row (move up/down/around):
309 $onClick="document.wizardForm.action+='#ANC_".(($k+1)*2-2)."';";
310 $onClick=' onclick="'.htmlspecialchars($onClick).'"';
311 $ctrl='';
312
313 $brTag=$this->inputStyle?'':'<br />';
314 if ($k!=0) {
315 $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;
316 } else {
317 $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;
318 }
319 $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;
320
321 if (($k+1)!=count($tLines)) {
322 $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;
323 } else {
324 $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;
325 }
326 $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;
327
328 $tRows[]='
329 <tr class="bgColor4">
330 <td class="bgColor5"><a name="ANC_'.(($k+1)*2).'"></a><span class="c-wizButtonsV">'.$ctrl.'</span></td>
331 <td>'.implode('</td>
332 <td>',$cells).'</td>
333 </tr>';
334
335 // Increment counter:
336 $k++;
337 }
338 }
339
340 // CTRL panel for a table column (move left/right/around/delete)
341 $cells=array();
342 $cells[]='';
343 // Finding first row:
344 reset($cfgArr);
345 $firstRow=current($cfgArr);
346 if (is_array($firstRow)) {
347
348 // Init:
349 $a=0;
350 $cols=count($firstRow);
351
352 // Traverse first row:
353 foreach($firstRow as $temp) {
354 $ctrl='';
355 if ($a!=0) {
356 $ctrl.='<input type="image" name="TABLE[col_left]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg('','gfx/pil2left.gif','').' title="'.$LANG->getLL('table_left',1).'" />';
357 } else {
358 $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).'" />';
359 }
360 $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).'" />';
361 if (($a+1)!=$cols) {
362 $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).'" />';
363 } else {
364 $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).'" />';
365 }
366 $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).'" />';
367 $cells[]='<span class="c-wizButtonsH">'.$ctrl.'</span>';
368
369 // Incr. counter:
370 $a++;
371 }
372 $tRows[]='
373 <tr class="bgColor5">
374 <td align="center">'.implode('</td>
375 <td align="center">',$cells).'</td>
376 </tr>';
377 }
378
379 $content = '';
380
381 // Add CSH:
382 $content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'wizard_table_wiz', $GLOBALS['BACK_PATH'],'');
383
384 // Implode all table rows into a string, wrapped in table tags.
385 $content.= '
386
387
388 <!--
389 Table wizard
390 -->
391 <table border="0" cellpadding="0" cellspacing="1" id="typo3-tablewizard">
392 '.implode('',$tRows).'
393 </table>';
394
395 // Add saving buttons in the bottom:
396 $content.= '
397
398 <!--
399 Save buttons:
400 -->
401 <div id="c-saveButtonPanel">';
402 $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).'" />';
403 $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).'" />';
404 $content.= '<a href="#" onclick="'.htmlspecialchars('jumpToUrl(unescape(\''.rawurlencode($this->P['returnUrl']).'\')); return false;').'">'.
405 '<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="" />'.
406 '</a>';
407 $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).'" />';
408 $content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'wizard_table_wiz_buttons', $GLOBALS['BACK_PATH'],'');
409 $content.= '
410 </div>
411 ';
412
413 // Input type checkbox:
414 $content.= '
415
416 <!--
417 Input mode check box:
418 -->
419 <div id="c-inputMode">
420 '.
421 '<input type="hidden" name="TABLE[textFields]" value="0" />'.
422 '<input type="checkbox" name="TABLE[textFields]" value="1"'.($this->inputStyle?' checked="checked"':'').' /> '.
423 $LANG->getLL('table_smallFields').'
424 </div>
425
426 <br /><br />
427 ';
428
429 // Return content:
430 return $content;
431 }
432
433 /**
434 * Detects if a control button (up/down/around/delete) has been pressed for an item and accordingly it will manipulate the internal TABLECFG array
435 *
436 * @return void
437 * @access private
438 */
439 function changeFunc() {
440 if ($this->TABLECFG['col_remove']) {
441 $kk = key($this->TABLECFG['col_remove']);
442 $cmd='col_remove';
443 } elseif ($this->TABLECFG['col_add']) {
444 $kk = key($this->TABLECFG['col_add']);
445 $cmd='col_add';
446 } elseif ($this->TABLECFG['col_start']) {
447 $kk = key($this->TABLECFG['col_start']);
448 $cmd='col_start';
449 } elseif ($this->TABLECFG['col_end']) {
450 $kk = key($this->TABLECFG['col_end']);
451 $cmd='col_end';
452 } elseif ($this->TABLECFG['col_left']) {
453 $kk = key($this->TABLECFG['col_left']);
454 $cmd='col_left';
455 } elseif ($this->TABLECFG['col_right']) {
456 $kk = key($this->TABLECFG['col_right']);
457 $cmd='col_right';
458 } elseif ($this->TABLECFG['row_remove']) {
459 $kk = key($this->TABLECFG['row_remove']);
460 $cmd='row_remove';
461 } elseif ($this->TABLECFG['row_add']) {
462 $kk = key($this->TABLECFG['row_add']);
463 $cmd='row_add';
464 } elseif ($this->TABLECFG['row_top']) {
465 $kk = key($this->TABLECFG['row_top']);
466 $cmd='row_top';
467 } elseif ($this->TABLECFG['row_bottom']) {
468 $kk = key($this->TABLECFG['row_bottom']);
469 $cmd='row_bottom';
470 } elseif ($this->TABLECFG['row_up']) {
471 $kk = key($this->TABLECFG['row_up']);
472 $cmd='row_up';
473 } elseif ($this->TABLECFG['row_down']) {
474 $kk = key($this->TABLECFG['row_down']);
475 $cmd='row_down';
476 }
477
478 if ($cmd && t3lib_div::testInt($kk)) {
479 if (substr($cmd,0,4)=='row_') {
480 switch($cmd) {
481 case 'row_remove':
482 unset($this->TABLECFG['c'][$kk]);
483 break;
484 case 'row_add':
485 $this->TABLECFG['c'][$kk+1]=array();
486 break;
487 case 'row_top':
488 $this->TABLECFG['c'][1]=$this->TABLECFG['c'][$kk];
489 unset($this->TABLECFG['c'][$kk]);
490 break;
491 case 'row_bottom':
492 $this->TABLECFG['c'][10000000]=$this->TABLECFG['c'][$kk];
493 unset($this->TABLECFG['c'][$kk]);
494 break;
495 case 'row_up':
496 $this->TABLECFG['c'][$kk-3]=$this->TABLECFG['c'][$kk];
497 unset($this->TABLECFG['c'][$kk]);
498 break;
499 case 'row_down':
500 $this->TABLECFG['c'][$kk+3]=$this->TABLECFG['c'][$kk];
501 unset($this->TABLECFG['c'][$kk]);
502 break;
503 }
504 ksort($this->TABLECFG['c']);
505 }
506 if (substr($cmd,0,4)=='col_') {
507 reset($this->TABLECFG['c']);
508 while(list($cAK)=each($this->TABLECFG['c'])) {
509 switch($cmd) {
510 case 'col_remove':
511 unset($this->TABLECFG['c'][$cAK][$kk]);
512 break;
513 case 'col_add':
514 $this->TABLECFG['c'][$cAK][$kk+1]='';
515 break;
516 case 'col_start':
517 $this->TABLECFG['c'][$cAK][1]=$this->TABLECFG['c'][$cAK][$kk];
518 unset($this->TABLECFG['c'][$cAK][$kk]);
519 break;
520 case 'col_end':
521 $this->TABLECFG['c'][$cAK][1000000]=$this->TABLECFG['c'][$cAK][$kk];
522 unset($this->TABLECFG['c'][$cAK][$kk]);
523 break;
524 case 'col_left':
525 $this->TABLECFG['c'][$cAK][$kk-3]=$this->TABLECFG['c'][$cAK][$kk];
526 unset($this->TABLECFG['c'][$cAK][$kk]);
527 break;
528 case 'col_right':
529 $this->TABLECFG['c'][$cAK][$kk+3]=$this->TABLECFG['c'][$cAK][$kk];
530 unset($this->TABLECFG['c'][$cAK][$kk]);
531 break;
532 }
533 ksort($this->TABLECFG['c'][$cAK]);
534 }
535 }
536 }
537
538 // Convert line breaks to <br /> tags:
539 reset($this->TABLECFG['c']);
540 while(list($a)=each($this->TABLECFG['c'])) {
541 reset($this->TABLECFG['c'][$a]);
542 while(list($b)=each($this->TABLECFG['c'][$a])) {
543 $this->TABLECFG['c'][$a][$b] = str_replace(chr(10),'<br />',str_replace(chr(13),'',$this->TABLECFG['c'][$a][$b]));
544 }
545 }
546 }
547
548 /**
549 * Converts the input array to a configuration code string
550 *
551 * @param array Array of table configuration (follows the input structure from the table wizard POST form)
552 * @return string The array converted into a string with line-based configuration.
553 * @see cfgString2CfgArray()
554 */
555 function cfgArray2CfgString($cfgArr) {
556
557 // Initialize:
558 $inLines=array();
559
560 // Traverse the elements of the table wizard and transform the settings into configuration code.
561 reset($this->TABLECFG['c']);
562 while(list($a)=each($this->TABLECFG['c'])) {
563 $thisLine=array();
564 reset($this->TABLECFG['c'][$a]);
565 while(list($b)=each($this->TABLECFG['c'][$a])) {
566 $thisLine[]=str_replace('|','',$this->TABLECFG['c'][$a][$b]);
567 }
568 $inLines[]=implode('|',$thisLine);
569 }
570
571 // Finally, implode the lines into a string:
572 $bodyText = implode(chr(10),$inLines);
573
574 // Return the configuration code:
575 return $bodyText;
576 }
577
578 /**
579 * Converts the input configuration code string into an array
580 *
581 * @param string Configuration code
582 * @param integer Default number of columns
583 * @return array Configuration array
584 * @see cfgArray2CfgString()
585 */
586 function cfgString2CfgArray($cfgStr,$cols) {
587
588 // Explode lines in the configuration code - each line is a table row.
589 $tLines=explode(chr(10),$cfgStr);
590
591 // Setting number of columns
592 if (!$cols && trim($tLines[0])) { // auto...
593 $cols = count(explode('|',$tLines[0]));
594 }
595 $cols=$cols?$cols:4;
596
597 // Traverse the number of table elements:
598 $cfgArr=array();
599 foreach($tLines as $k => $v) {
600
601 // Initialize:
602 $vParts = explode('|',$v);
603
604 // Traverse columns:
605 for ($a=0;$a<$cols;$a++) {
606 $cfgArr[$k][$a]=$vParts[$a];
607 }
608 }
609
610 // Return configuration array:
611 return $cfgArr;
612 }
613 }
614
615 // Include extension?
616 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_table.php']) {
617 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_table.php']);
618 }
619
620
621
622
623
624
625
626
627
628
629
630
631 // Make instance:
632 $SOBE = t3lib_div::makeInstance('SC_wizard_table');
633 $SOBE->init();
634
635 // Include files?
636 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
637
638 $SOBE->main();
639 $SOBE->printContent();
640 ?>