Initial revision
[Packages/TYPO3.CMS.git] / typo3 / wizard_forms.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skårhøj (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 forms (fx. for tt_content elements) of type "form".
29 *
30 * @author Kasper Skårhøj <kasper@typo3.com>
31 * @package TYPO3
32 * @subpackage core
33 *
34 */
35
36
37
38 $BACK_PATH="";
39 require ("init.php");
40 require ("template.php");
41 include ("sysext/lang/locallang_wizards.php");
42
43
44
45 // ***************************
46 // Script Classes
47 // ***************************
48 class SC_wizard_forms {
49 var $include_once=array();
50 var $content;
51 var $P;
52 var $doc;
53
54 function init() {
55 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
56
57 $this->P = t3lib_div::GPvar("P",1);
58
59 $this->doc = t3lib_div::makeInstance("mediumDoc");
60 $this->doc->backPath = $BACK_PATH;
61 $this->doc->JScode='
62 <script language="javascript" type="text/javascript">
63 function jumpToUrl(URL,formEl) {
64 document.location = URL;
65 }
66 </script>
67 ';
68
69 list($rUri) = explode("#",t3lib_div::getIndpEnv("REQUEST_URI"));
70 $this->doc->form ='<form action="'.$rUri.'" method="POST" name="wizardForm">';
71
72 $this->content.=$this->doc->startPage("Table");
73
74 if ($HTTP_POST_VARS["savedok_x"] || $HTTP_POST_VARS["saveandclosedok_x"]) {
75 $this->include_once[]=PATH_t3lib."class.t3lib_tcemain.php";
76 }
77 }
78 function main() {
79 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
80
81 if ($this->P["table"] && $this->P["field"] && $this->P["uid"]) {
82 $this->content.=$this->doc->section($LANG->getLL("forms_title"),$this->tableWizard($this->P),0,1);
83 } else {
84 $this->content.=$this->doc->section($LANG->getLL("forms_title"),$GLOBALS["TBE_TEMPLATE"]->rfw($LANG->getLL("table_noData")),0,1);
85 }
86 $this->content.=$this->doc->endPage();
87 }
88 function printContent() {
89 echo $this->content;
90 }
91
92 // ***************************
93 // OTHER FUNCTIONS:
94 // ***************************
95 function changeFunc($cArr,$TABLE_c) {
96 if ($TABLE_c["row_remove"]) {
97 $kk = key($TABLE_c["row_remove"]);
98 $cmd="row_remove";
99 } elseif ($TABLE_c["row_add"]) {
100 $kk = key($TABLE_c["row_add"]);
101 $cmd="row_add";
102 } elseif ($TABLE_c["row_top"]) {
103 $kk = key($TABLE_c["row_top"]);
104 $cmd="row_top";
105 } elseif ($TABLE_c["row_bottom"]) {
106 $kk = key($TABLE_c["row_bottom"]);
107 $cmd="row_bottom";
108 } elseif ($TABLE_c["row_up"]) {
109 $kk = key($TABLE_c["row_up"]);
110 $cmd="row_up";
111 } elseif ($TABLE_c["row_down"]) {
112 $kk = key($TABLE_c["row_down"]);
113 $cmd="row_down";
114 }
115
116 if ($cmd && t3lib_div::testInt($kk)) {
117 if (substr($cmd,0,4)=="row_") {
118 switch($cmd) {
119 case "row_remove":
120 unset($cArr[$kk]);
121 break;
122 case "row_add":
123 $cArr[$kk+1]=array();
124 break;
125 case "row_top":
126 $cArr[1]=$cArr[$kk];
127 unset($cArr[$kk]);
128 break;
129 case "row_bottom":
130 $cArr[1000000]=$cArr[$kk];
131 unset($cArr[$kk]);
132 break;
133 case "row_up":
134 $cArr[$kk-3]=$cArr[$kk];
135 unset($cArr[$kk]);
136 break;
137 case "row_down":
138 $cArr[$kk+3]=$cArr[$kk];
139 unset($cArr[$kk]);
140 break;
141 }
142 ksort($cArr);
143 }
144 }
145
146 return $cArr;
147 }
148 function cleanT($tArr) {
149 for($a=count($tArr);$a>0;$a--) {
150 if (strcmp($tArr[$a-1],"")) {
151 break;
152 } else {
153 unset($tArr[$a-1]);
154 }
155 }
156 return $tArr;
157 }
158 function formatCells($fArr) {
159 reset($fArr);
160 $lines=array();
161 while(list($l,$c)=each($fArr)) {
162 $lines[]='<tr><td nowrap>'.htmlspecialchars($l.":").'&nbsp;</td><td>'.$c.'</td></tr>';
163 }
164 $lines[]='<tr><td nowrap><img src=clear.gif width=70 height=1></td><td></td></tr>';
165 return '<table border=0 cellpadding=0 cellspacing=0>'.implode("",$lines).'</table>';
166 }
167 function tableWizard($P) {
168 global $LANG, $HTTP_POST_VARS;
169
170 $TABLE_c = t3lib_div::GPvar("TABLE",1);
171 $row=t3lib_BEfunc::getRecord($P["table"],$P["uid"]);
172 if (!is_array($row)) {
173 t3lib_BEfunc::typo3PrintError ("Wizard Error","No reference to record",0);
174 exit;
175 }
176
177 $special=t3lib_div::GPvar("special");
178
179 if (isset($TABLE_c["c"])) {
180 $TABLE_c["c"] = $this->changeFunc($TABLE_c["c"],$TABLE_c);
181 $inLines=array();
182
183 reset($TABLE_c["c"]);
184 while(list($a,$vv)=each($TABLE_c["c"])) {
185 if ($vv["content"]) {
186 $inLines[]=trim($vv["content"]);
187 } else {
188 $thisLine=array();
189 // Label:
190 $thisLine[0]=str_replace("|","",$vv["label"]);
191
192 // Type:
193 if ($vv["type"]) {
194 $thisLine[1]=($vv["required"]?"*":"").str_replace(",","",($vv["fieldname"]?$vv["fieldname"]."=":"").$vv["type"]);
195 // Default:
196 $tArr=array("","","","","","");
197 switch((string)$vv["type"]) {
198 case "textarea":
199 if (intval($vv["cols"])) $tArr[0]=intval($vv["cols"]);
200 if (intval($vv["rows"])) $tArr[1]=intval($vv["rows"]);
201 if (trim($vv["extra"])) $tArr[2]=trim($vv["extra"]);
202 break;
203 case "input":
204 case "password":
205 if (intval($vv["size"])) $tArr[0]=intval($vv["size"]);
206 if (intval($vv["max"])) $tArr[1]=intval($vv["max"]);
207 break;
208 case "file":
209 if (intval($vv["size"])) $tArr[0]=intval($vv["size"]);
210 break;
211 case "select":
212 if (intval($vv["size"])) $tArr[0]=intval($vv["size"]);
213 if ($vv["autosize"]) $tArr[0]="auto";
214 if ($vv["multiple"]) $tArr[1]="m";
215 break;
216 }
217 $tArr = $this->cleanT($tArr);
218 if (count($tArr)) $thisLine[1].=",".implode(",",$tArr);
219
220 $thisLine[1]=str_replace("|","",$thisLine[1]);
221
222
223
224 // Default:
225 if ($vv["type"]=="select" || $vv["type"]=="radio") {
226 $thisLine[2]=str_replace(chr(10),", ",str_replace(",","",$vv["options"]));
227 } elseif ($vv["type"]=="check") {
228 if ($vv["checked"]) $thisLine[2]=1;
229 } elseif (strcmp(trim($vv["default"]),"")) {
230 $thisLine[2]=$vv["default"];
231 }
232 if (isset($thisLine[2])) $thisLine[2]=str_replace("|","",$thisLine[2]);
233 }
234 // Compile line:
235 $inLines[]=ereg_replace("[\n\r]*","",implode(" | ",$thisLine));
236 }
237 }
238 $bodyText = implode(chr(10),$inLines);
239 //debug(array($bodyText));
240
241
242
243 if ($HTTP_POST_VARS["savedok_x"] || $HTTP_POST_VARS["saveandclosedok_x"]) {
244 $tce = t3lib_div::makeInstance("t3lib_TCEmain");
245 $tce->stripslashes_values=0;
246 $data=array();
247 $data[$P["table"]][$P["uid"]][$P["field"]]=$bodyText;
248 if ($special=="formtype_mail") {
249 $data[$P["table"]][$P["uid"]]["subheader"]=$TABLE_c["recipient"];
250 }
251
252 //debug($data);
253 $tce->start($data,array());
254 $tce->process_datamap();
255
256 $row=t3lib_BEfunc::getRecord($P["table"],$P["uid"]);
257 if ($HTTP_POST_VARS["saveandclosedok_x"]) {
258 header("Location: ".t3lib_div::locationHeaderUrl($P["returnUrl"]));
259 exit;
260 }
261 }
262 } else {
263 $bodyText = $row["bodytext"];
264 }
265 //$bodyText = $row["bodytext"];
266
267
268 $specParts=array();
269 $hiddenFields=array();
270 $tRows=array();
271 $cells=array(
272 '<strong>'.$LANG->getLL("forms_preview").':</strong>',
273 '<strong>'.$LANG->getLL("forms_element").':</strong>',
274 '<strong>'.$LANG->getLL("forms_config").':</strong>',
275 );
276 $tRows[]='<tr bgColor="'.$this->doc->bgColor2.'"><td>&nbsp;</td><td nowrap>'.implode('</td><td nowrap valign=top>',$cells).'</td></tr>';
277
278 $tLines=explode(chr(10),$bodyText);
279 //debug($tLines);
280 reset($tLines);
281 while(list($k,$v)=each($tLines)) {
282 $cells=array();
283 $confData=array();
284
285 $val=trim($v);
286 $parts = t3lib_div::trimExplode("|",$val);
287
288 if (!trim($val) || strcspn($val,"#/")) { // $val &&
289 // label:
290 $confData["label"] = trim($parts[0]);
291 // field:
292 $fParts = t3lib_div::trimExplode(",",$parts[1]);
293 $fParts[0]=trim($fParts[0]);
294 if (substr($fParts[0],0,1)=="*") {
295 $confData["required"]=1;
296 $fParts[0] = substr($fParts[0],1);
297 }
298 $typeParts = t3lib_div::trimExplode("=",$fParts[0]);
299 $confData["type"] = trim(strtolower(end($typeParts)));
300 if (count($typeParts)==1) {
301 $confData["fieldname"] = substr(ereg_replace("[^a-zA-Z0-9_]","",str_replace(" ","_",trim($parts[0]))),0,30);
302 /* if (strtolower($confData["fieldname"])=="email") {$confData["fieldname"]="email";}
303 // Duplicate fieldnames resolved
304 if (isset($fieldname_hashArray[md5($confData["fieldname"])])) {
305 $confData["fieldname"].="_".$cc;
306 }
307 $fieldname_hashArray[md5($confData["fieldname"])]=$confData["fieldname"];
308 */
309 // Attachment names...
310 if ($confData["type"]=="file") {
311 $confData["fieldname"]="attachment".$attachmentCounter;
312 $attachmentCounter=intval($attachmentCounter)+1;
313 }
314 } else {
315 $confData["fieldname"] = str_replace(" ","_",trim($typeParts[0]));
316 }
317
318 if ($special=="formtype_mail" && t3lib_div::inList("formtype_mail,subject,html_enabled",$confData["fieldname"])) {
319 $specParts[$confData["fieldname"]]=$parts[2];
320 } else {
321 // Render title/field preview
322 $cells[]=$confData["type"]!="hidden" ? '<strong>'.htmlspecialchars($confData["label"]).'</strong>' : '';
323
324 $temp_cells=array();
325 // Field type
326 $opt=array();
327 $opt[]='<option value=""></option>';
328 $types = explode(",","input,textarea,select,check,radio,password,file,hidden,submit");
329 while(list(,$t)=each($types)) {
330 $opt[]='<option value="'.$t.'"'.($confData["type"]==$t?" SELECTED":"").'>'.htmlspecialchars($LANG->getLL("forms_type_".$t)).'</option>';
331 }
332 $temp_cells[$LANG->getLL("forms_type")]='<select name="TABLE[c]['.(($k+1)*2).'][type]">'.implode("",$opt).'</select>';
333 // Title field
334 $temp_cells[$LANG->getLL("forms_label")]='<input type="text"'.$this->doc->formWidth(15).' name="TABLE[c]['.(($k+1)*2).'][label]" value="'.htmlspecialchars($confData["label"]).'">';
335 // Required
336 if (!t3lib_div::inList(",hidden,submit",$confData["type"])) $temp_cells[$LANG->getLL("forms_required")]='<input type="checkbox" name="TABLE[c]['.(($k+1)*2).'][required]" value="1"'.($confData["required"]?" CHECKED":"").t3lib_BEfunc::titleAttrib($LANG->getLL("forms_required"),1).'>';
337
338 $cells[]=$this->formatCells($temp_cells);
339 $temp_cells=array();
340
341 // Fieldname
342 $temp_cells[$LANG->getLL("forms_fieldName")]='<input type="text"'.$this->doc->formWidth(10).' name="TABLE[c]['.(($k+1)*2).'][fieldname]" value="'.htmlspecialchars($confData["fieldname"]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_fieldName"),1).'>';
343 switch((string)$confData["type"]) {
344 case "textarea":
345 $temp_cells[$LANG->getLL("forms_cols")]='<input type="text"'.$this->doc->formWidth(5).' name="TABLE[c]['.(($k+1)*2).'][cols]" value="'.htmlspecialchars($fParts[1]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_cols"),1).'>';
346 $temp_cells[$LANG->getLL("forms_rows")]='<input type="text"'.$this->doc->formWidth(5).' name="TABLE[c]['.(($k+1)*2).'][rows]" value="'.htmlspecialchars($fParts[2]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_rows"),1).'>';
347 $temp_cells[$LANG->getLL("forms_extra")]='<input type="checkbox" name="TABLE[c]['.(($k+1)*2).'][extra]" value="OFF"'.(strtoupper($fParts[3])=="OFF"?" CHECKED":"").t3lib_BEfunc::titleAttrib($LANG->getLL("forms_extra"),1).'>';
348 break;
349 case "input":
350 case "password":
351 $temp_cells[$LANG->getLL("forms_size")]='<input type="text"'.$this->doc->formWidth(5).' name="TABLE[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($fParts[1]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_size"),1).'>';
352 $temp_cells[$LANG->getLL("forms_max")]='<input type="text"'.$this->doc->formWidth(5).' name="TABLE[c]['.(($k+1)*2).'][max]" value="'.htmlspecialchars($fParts[2]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_max"),1).'>';
353 break;
354 case "file":
355 $temp_cells[$LANG->getLL("forms_size")]='<input type="text"'.$this->doc->formWidth(5).' name="TABLE[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($fParts[1]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_size"),1).'>';
356 break;
357 case "select":
358 $temp_cells[$LANG->getLL("forms_size")]='<input type="text"'.$this->doc->formWidth(5).' name="TABLE[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars(intval($fParts[1])?$fParts[1]:"").'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_size"),1).'>';
359 $temp_cells[$LANG->getLL("forms_autosize")]='<input type="checkbox" name="TABLE[c]['.(($k+1)*2).'][autosize]" value="1"'.(strtolower(trim($fParts[1]))=="auto"?" CHECKED":"").t3lib_BEfunc::titleAttrib($LANG->getLL("forms_autosize"),1).'>';
360 $temp_cells[$LANG->getLL("forms_multiple")]='<input type="checkbox" name="TABLE[c]['.(($k+1)*2).'][multiple]" value="1"'.(strtolower(trim($fParts[2]))=="m"?" CHECKED":"").t3lib_BEfunc::titleAttrib($LANG->getLL("forms_multiple"),1).'>';
361 break;
362 }
363
364 // Default data
365 if ($confData["type"]=="select" || $confData["type"]=="radio") {
366 $temp_cells[$LANG->getLL("forms_options")]='<textarea '.$this->doc->formWidthText(15).' rows="4" name="TABLE[c]['.(($k+1)*2).'][options]"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_options"),1).'>'.t3lib_div::formatForTextarea(implode(chr(10),t3lib_div::trimExplode(",",$parts[2]))).'</textarea>';
367 } elseif ($confData["type"]=="check") {
368 $temp_cells[$LANG->getLL("forms_checked")]='<input type="checkbox" name="TABLE[c]['.(($k+1)*2).'][default]" value="1"'.(trim($parts[2])?" CHECKED":"").t3lib_BEfunc::titleAttrib($LANG->getLL("forms_checked"),1).'>';
369 } elseif ($confData["type"] && $confData["type"]!="file") {
370 $temp_cells[$LANG->getLL("forms_default")]='<input type="text"'.$this->doc->formWidth(15).' name="TABLE[c]['.(($k+1)*2).'][default]" value="'.htmlspecialchars($parts[2]).'"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_default"),1).'>';
371 }
372
373 $cells[]=$confData["type"]?$this->formatCells($temp_cells):"";
374
375 // CTRL panel:
376 $ctrl="";
377 $onClick="document.wizardForm.action+='#ANC_".(($k+1)*2-2)."';";
378 $onClick=' onClick="'.$onClick.'"';
379
380 $brTag=$inputStyle?"":"<BR>";
381 if ($k!=0) {
382 $ctrl.='<input type="image" name="TABLE[row_up]['.(($k+1)*2).']" src="gfx/pil2up.gif" width="12" vspace=2 height="7" hspace=1 border="0"'.$onClick.t3lib_BEfunc::titleAttrib($LANG->getLL("table_up")).'>'.$brTag;
383 } else {
384 $ctrl.='<input type="image" name="TABLE[row_bottom]['.(($k+1)*2).']" src="gfx/turn_up.gif" width="11" vspace=2 height="9" hspace=1 border="0"'.$onClick.t3lib_BEfunc::titleAttrib($LANG->getLL("table_bottom")).'>'.$brTag;
385 }
386 $ctrl.='<input type="image" name="TABLE[row_remove]['.(($k+1)*2).']" src="gfx/garbage.gif" width="11" height="12" border="0"'.$onClick.t3lib_BEfunc::titleAttrib($LANG->getLL("table_removeRow")).'>'.$brTag;
387 if (($k+1)!=count($tLines)) {
388 $ctrl.='<input type="image" name="TABLE[row_down]['.(($k+1)*2).']" src="gfx/pil2down.gif" width="12" vspace=2 height="7" hspace=1 border="0"'.$onClick.t3lib_BEfunc::titleAttrib($LANG->getLL("table_down")).'>'.$brTag;
389 } else {
390 $ctrl.='<input type="image" name="TABLE[row_top]['.(($k+1)*2).']" src="gfx/turn_down.gif" width="11" vspace=2 height="9" hspace=1 border="0"'.$onClick.t3lib_BEfunc::titleAttrib($LANG->getLL("table_top")).'>'.$brTag;
391 }
392 $ctrl.='<input type="image" name="TABLE[row_add]['.(($k+1)*2).']" src="gfx/add.gif" width="12" height="12" border="0"'.$onClick.t3lib_BEfunc::titleAttrib($LANG->getLL("table_addRow")).'>'.$brTag;
393
394 $bgC = $confData["type"]?' bgColor="'.$this->doc->bgColor5.'"':'';
395 $tRows[]='<tr'.$bgC.'><td><a name="ANC_'.(($k+1)*2).'"></a>'.$ctrl.'</td><td bgColor="'.$this->doc->bgColor4.'">'.implode('</td><td valign=top>',$cells).'</td></tr>';
396 }
397 } else {
398 $hiddenFields[]='<input type="hidden" name="TABLE[c]['.(($k+1)*2).'][content]" value="'.htmlspecialchars(trim($v)).'">';
399 }
400 }
401
402 if ($special=="formtype_mail") {
403 //debug($specParts);
404 // SUbject
405 $tRows[]='<tr><td colspan=4>&nbsp;</td></tr>';
406 // SUbject
407 $tRows[]='<tr><td colspan=2 bgColor="'.$this->doc->bgColor2.'">&nbsp;</td><td colspan=2 bgColor="'.$this->doc->bgColor2.'"><strong>'.htmlspecialchars($LANG->getLL("forms_special_eform")).':</strong></td></tr>';
408 // SUbject
409 $tRows[]='<tr bgColor="'.$this->doc->bgColor5.'">
410 <td>&nbsp;</td>
411 <td bgColor="'.$this->doc->bgColor4.'">&nbsp;</td>
412 <td>'.$LANG->getLL("forms_eform_formtype_mail").':</td>
413 <td><input type="hidden" name="TABLE[c]['.(1000*2).'][fieldname]" value="formtype_mail"><input type="hidden" name="TABLE[c]['.(1000*2).'][type]" value="submit"><input type="text"'.$this->doc->formWidth(15).' name="TABLE[c]['.(1000*2).'][default]" value="'.htmlspecialchars($specParts["formtype_mail"]).'"></td>
414 </tr>';
415 $tRows[]='<tr bgColor="'.$this->doc->bgColor5.'">
416 <td>&nbsp;</td>
417 <td bgColor="'.$this->doc->bgColor4.'">&nbsp;</td>
418 <td>'.$LANG->getLL("forms_eform_html_enabled").':</td>
419 <td><input type="hidden" name="TABLE[c]['.(1001*2).'][fieldname]" value="html_enabled"><input type="hidden" name="TABLE[c]['.(1001*2).'][type]" value="hidden"><input type="checkbox" name="TABLE[c]['.(1001*2).'][default]" value="1"'.($specParts["html_enabled"]?" CHECKED":"").'></td>
420 </tr>';
421 $tRows[]='<tr bgColor="'.$this->doc->bgColor5.'">
422 <td>&nbsp;</td>
423 <td bgColor="'.$this->doc->bgColor4.'">&nbsp;</td>
424 <td>'.$LANG->getLL("forms_eform_subject").':</td>
425 <td><input type="hidden" name="TABLE[c]['.(1002*2).'][fieldname]" value="subject"><input type="hidden" name="TABLE[c]['.(1002*2).'][type]" value="hidden"><input type="text"'.$this->doc->formWidth(15).' name="TABLE[c]['.(1002*2).'][default]" value="'.htmlspecialchars($specParts["subject"]).'"></td>
426 </tr>';
427 $tRows[]='<tr bgColor="'.$this->doc->bgColor5.'">
428 <td>&nbsp;</td>
429 <td bgColor="'.$this->doc->bgColor4.'">&nbsp;</td>
430 <td>'.$LANG->getLL("forms_eform_recipient").':</td>
431 <td><input type="text"'.$this->doc->formWidth(15).' name="TABLE[recipient]" value="'.htmlspecialchars($row["subheader"]).'"></td>
432 </tr>';
433 }
434
435
436 //
437 $content = '<table border=0 cellpadding=1 cellspacing=1>'.implode("",$tRows).'</table>';
438
439 $closeUrl = $P["returnUrl"];
440
441 $content.= '<BR>';
442 $content.= '<input type="image" border=0 name="savedok" src="gfx/savedok.gif" hspace=2 width="21" height="16"'.t3lib_BEfunc::titleAttrib($LANG->sL("LLL:EXT:lang/locallang_core.php:rm.saveDoc"),1).' align=top>';
443 $content.= '<input type="image" border=0 name="saveandclosedok" src="gfx/saveandclosedok.gif" hspace=2 width="21" height="16"'.t3lib_BEfunc::titleAttrib($LANG->sL("LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc"),1).' align=top>';
444 $content.= '<a href="#" onClick="jumpToUrl(unescape(\''.rawurlencode($closeUrl).'\')); return false;"><img border=0 src="gfx/closedok.gif" hspace=2 width="21" height="16"'.t3lib_BEfunc::titleAttrib($LANG->sL("LLL:EXT:lang/locallang_core.php:rm.closeDoc"),1).' align=top></a>';
445 $content.= '<input type="image" name="_refresh" src="gfx/refresh_n.gif" width="14" height="14" hspace=10 border="0"'.t3lib_BEfunc::titleAttrib($LANG->getLL("forms_refresh")).'>';
446 $content.= implode("",$hiddenFields);
447
448 return $content;
449 }
450 }
451
452 // Include extension?
453 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["typo3/wizard_forms.php"]) {
454 include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["typo3/wizard_forms.php"]);
455 }
456
457
458
459
460
461
462
463
464
465
466
467
468 // Make instance:
469 $SOBE = t3lib_div::makeInstance("SC_wizard_forms");
470 $SOBE->init();
471
472 // Include files?
473 reset($SOBE->include_once);
474 while(list(,$INC_FILE)=each($SOBE->include_once)) {include_once($INC_FILE);}
475
476 $SOBE->main();
477 $SOBE->printContent();
478 ?>