| 1 |
lars |
1 |
<?
|
|
|
2 |
$self=basename($PHP_SELF);
|
|
|
3 |
$DB="verteiler";
|
|
|
4 |
define ("modul_name", "mail_verteiler");
|
|
|
5 |
define ("tool_name", "versenden");
|
|
|
6 |
require_once "../Online-Shop/connect2.php";
|
|
|
7 |
|
|
|
8 |
if (!isset($user_rechte[mail_verteiler][versenden][html]))
|
|
|
9 |
{
|
|
|
10 |
header("Location: mailVerteilerSelect.php");
|
|
|
11 |
}
|
|
|
12 |
|
|
|
13 |
function attachments($splitter)
|
|
|
14 |
{
|
|
|
15 |
$buffer = array();
|
|
|
16 |
foreach(array_keys($_FILES["attach"]["error"]) as $fileIndex => $errorCode)
|
|
|
17 |
{
|
|
|
18 |
if ($_FILES["attach"]["error"][$fileIndex] == 0)
|
|
|
19 |
{
|
|
|
20 |
$buffer[] = implode("\n", array
|
|
|
21 |
(
|
|
|
22 |
"--".$splitter,
|
|
|
23 |
"Content-Type: ".$_FILES["attach"]["type"][$fileIndex].";",
|
|
|
24 |
"\tname=\"".$_FILES["attach"]["name"][$fileIndex]."\"",
|
|
|
25 |
"Content-Transfer-Encoding: base64",
|
|
|
26 |
"Content-Disposition: attachment;",
|
|
|
27 |
"\tfilename=\"".$_FILES["attach"]["name"][$fileIndex]."\"",
|
|
|
28 |
"",
|
|
|
29 |
chunk_split(base64_encode(file_get_contents($_FILES["attach"]["tmp_name"][$fileIndex]))),
|
|
|
30 |
""
|
|
|
31 |
));
|
|
|
32 |
}
|
|
|
33 |
}
|
|
|
34 |
return
|
|
|
35 |
implode("\n",$buffer);
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
if ($action)
|
|
|
39 |
{
|
|
|
40 |
|
|
|
41 |
$query="SELECT * FROM Verteiler where ID = $Verteiler_NR";
|
|
|
42 |
$result_Verteiler = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query<hr>");
|
|
|
43 |
$Verteiler=mysql_fetch_array($result_Verteiler);
|
|
|
44 |
|
|
|
45 |
$headers["From"]="From: $Verteiler[Absender]";
|
|
|
46 |
//$headers["CC"]="";
|
|
|
47 |
//$headers["BCC"]="";
|
|
|
48 |
|
|
|
49 |
unset($text);
|
|
|
50 |
|
|
|
51 |
/* ############################################################################################ */
|
|
|
52 |
/* Nachricht zusammenstellen */
|
|
|
53 |
/* ############################################################################################ */
|
|
|
54 |
/* boundary für diese Nachricht festlegen */
|
|
|
55 |
/* INIT $boundary */
|
|
|
56 |
srand ((double)microtime()*1000000);
|
|
|
57 |
$boundary="";
|
|
|
58 |
for ($a=0; $a <= 15; $a++) { $boundary=$boundary.sprintf("%02X",rand(0,255));}
|
|
|
59 |
$boundary="=_".$boundary;
|
|
|
60 |
/* boundary für diese Nachricht festlegen */
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
/* Headers erweitern */
|
|
|
64 |
$headers["MIME-Version"] = "MIME-Version: 1.0";
|
|
|
65 |
$headers["Content-Type"] = "Content-Type: multipart/alternative;";
|
|
|
66 |
$headers["boundary"] = chr(9)."boundary=\"".$boundary."\"";
|
|
|
67 |
|
|
|
68 |
$CONTENT_HEADERS=array
|
|
|
69 |
(
|
|
|
70 |
"PLAIN" => array
|
|
|
71 |
(
|
|
|
72 |
"--".$boundary,
|
|
|
73 |
"Content-Type: text/plain; charset=\"ISO-8859-1\"",
|
|
|
74 |
"Content-Transfer-Encoding: 7bit",
|
|
|
75 |
"",
|
|
|
76 |
""
|
|
|
77 |
),
|
|
|
78 |
"HTML" => array
|
|
|
79 |
(
|
|
|
80 |
"",
|
|
|
81 |
"--".$boundary,
|
|
|
82 |
"Content-Type: text/html; charset=\"ISO-8859-1\"",
|
|
|
83 |
"Content-Transfer-Encoding: quoted-printable",
|
|
|
84 |
"",
|
|
|
85 |
""
|
|
|
86 |
)
|
|
|
87 |
);
|
|
|
88 |
|
|
|
89 |
/* LOGOUT-LINK an eingegebene Nachrichten anhängen */
|
|
|
90 |
if (isset($web_rechte[mail_verteiler][verteiler][logout_link]))
|
|
|
91 |
{
|
|
|
92 |
$message[PLAIN]=$message[PLAIN]."\n\n[logout_link]";
|
|
|
93 |
$message[HTML]=stripslashes(preg_replace ("/=/", "=3D", $message[HTML]."<br><br><a href=\"[logout_link]\">Newsletter abbestellen</a>"));
|
|
|
94 |
}
|
|
|
95 |
else
|
|
|
96 |
{
|
|
|
97 |
$message[PLAIN]=$message[PLAIN];
|
|
|
98 |
$message[HTML]=stripslashes(preg_replace ("/=/", "=3D", $message[HTML]));
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
foreach(array_keys($CONTENT_HEADERS) as $elem)
|
|
|
102 |
{
|
|
|
103 |
$message[$elem]=join($CONTENT_HEADERS[$elem],"\n").$message[$elem];
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
$message[]=attachments($boundary);
|
|
|
107 |
|
|
|
108 |
$text=join($message,"\n")."\n--".$boundary."--\n";
|
|
|
109 |
|
|
|
110 |
/* ############################################################################################ */
|
|
|
111 |
/* Nachricht zusammenstellen ENDE */
|
|
|
112 |
/* ############################################################################################ */
|
|
|
113 |
|
|
|
114 |
// Aus dem Textfeld ein tolles Array machen!
|
|
|
115 |
$To=preg_replace("/[\n]/", "", $To);
|
|
|
116 |
$To = explode("|",$To);
|
|
|
117 |
// Den letzten Wert killen
|
|
|
118 |
unset($To[count($To) - 1]);
|
|
|
119 |
|
|
|
120 |
$grundfunktionen = explode(";", $web_rechte[mail_verteiler][versenden][grundfunktionen]);
|
|
|
121 |
$i = 0;
|
|
|
122 |
foreach ($To as $key => $value) {
|
|
|
123 |
// Semikolon anhängen, zum besseren arbeiten
|
|
|
124 |
$value .= ";";
|
|
|
125 |
// Mail ist immer zuerst
|
|
|
126 |
$To_array[$i][E_Mail] = substr($value, 0, strpos($value, ";"));
|
|
|
127 |
// Für jede Grundfunktion
|
|
|
128 |
foreach($grundfunktionen as $key2 => $value2) {
|
|
|
129 |
// Erst den vorherigen wert abschneiden (bis einschließlich ";")
|
|
|
130 |
$value = strstr($value, ";");
|
|
|
131 |
$value = substr($value, 1);
|
|
|
132 |
// Der key ist gleich dem value von $grundfunktionen und value ist der wert bis zum ersten ";"
|
|
|
133 |
$To_array[$i][$value2] = substr($value, 0, strpos($value, ";"));
|
|
|
134 |
}
|
|
|
135 |
$i++;
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
$To = $To_array;
|
|
|
139 |
foreach($To as $value)
|
|
|
140 |
{
|
|
|
141 |
$logout_link = $web_rechte[mail_verteiler][verteiler][logout_link]."?m=".$value[E_Mail]."&v=".$Verteiler[ID];
|
|
|
142 |
|
|
|
143 |
$text2=preg_replace
|
|
|
144 |
(
|
|
|
145 |
"/\[logout_link\]/",
|
|
|
146 |
stripslashes
|
|
|
147 |
(
|
|
|
148 |
preg_replace
|
|
|
149 |
(
|
|
|
150 |
"/=/",
|
|
|
151 |
"=3D",
|
|
|
152 |
$logout_link
|
|
|
153 |
)
|
|
|
154 |
),
|
|
|
155 |
$text
|
|
|
156 |
);
|
|
|
157 |
// Mails verschicken wird überbewertet!
|
|
|
158 |
//mail($mailadresse, $Verteiler[Betreff], $text2, implode("\n",$headers));
|
|
|
159 |
|
|
|
160 |
// In den Mailspool packen
|
|
|
161 |
|
|
|
162 |
// Aber vorher den Text ($text2) parsen
|
|
|
163 |
/*
|
|
|
164 |
Was zu parsen ist steht ja in den Grundfunktionen. Zum Beispiel 'Name1' und 'ID'. In $to stehen ja die Werte dafür.
|
|
|
165 |
'E_Mail' steht immer an erster Stelle, hat also den Platzhalter #1#. Die weiteren zu parsenden Sachen stehen in
|
|
|
166 |
$grundfunktionen. Angefangen mit 0. Aber der erste nach 'E_Mail' startet mit 2. Also in der Schleife unten immer
|
|
|
167 |
+2 nehmen
|
|
|
168 |
*/
|
|
|
169 |
$grundfunktionen = explode(";", $web_rechte[mail_verteiler][versenden][grundfunktionen]);
|
|
|
170 |
$subst = $value[E_Mail];
|
|
|
171 |
$text2 = str_replace("<in1in>", $subst, $text2);
|
|
|
172 |
$text2 = str_replace("##1##", $subst, $text2);
|
|
|
173 |
foreach($grundfunktionen as $key2 => $value2) {
|
|
|
174 |
$subst = $value[$value2];
|
|
|
175 |
$i = $key2 + 2;
|
|
|
176 |
$text2 = str_replace("##$i##", $subst, $text2);
|
|
|
177 |
}
|
|
|
178 |
|
|
|
179 |
$mail[webs_ID] = $webs[ID];
|
|
|
180 |
$mail[to] = $value[E_Mail];
|
|
|
181 |
$mail[cc] = '';
|
|
|
182 |
$mail[bcc] = '';
|
|
|
183 |
$mail[subject] = $Verteiler[Betreff];
|
|
|
184 |
$mail[from] = $Verteiler[Absender];
|
|
|
185 |
$mail[header_add] = implode("\n",$headers);
|
|
|
186 |
$mail[text] = $text2;
|
|
|
187 |
$mail[takeoff] = date("Y-m-d H:i:s"); // Takeoff ist immer NOW (Format: "2005-10-20 13:17:23"
|
|
|
188 |
$mail[erstellt_von] = $PHP_AUTH_USER;
|
|
|
189 |
|
|
|
190 |
$query_spool = "USE content_management";
|
|
|
191 |
$result = mysql_query ($query_spool, $localhost_dbh) or die (mysql_errno().": ".mysql_error()."<hr>$query_spool<hr>");
|
|
|
192 |
|
|
|
193 |
$query_spool = "
|
|
|
194 |
INSERT INTO
|
|
|
195 |
`mailspool_out`
|
|
|
196 |
(
|
|
|
197 |
`ID` ,
|
|
|
198 |
`webs_ID` ,
|
|
|
199 |
`to` ,
|
|
|
200 |
`cc` ,
|
|
|
201 |
`bcc` ,
|
|
|
202 |
`subject` ,
|
|
|
203 |
`from` ,
|
|
|
204 |
`header_add` ,
|
|
|
205 |
`text` ,
|
|
|
206 |
`takeoff` ,
|
|
|
207 |
`erstellt_am` ,
|
|
|
208 |
`erstellt_von`
|
|
|
209 |
)
|
|
|
210 |
VALUES
|
|
|
211 |
(
|
|
|
212 |
'',
|
|
|
213 |
'".($mail[webs_ID])."',
|
|
|
214 |
'".($mail[to])."',
|
|
|
215 |
'".($mail[cc])."' ,
|
|
|
216 |
'".($mail[bcc])."' ,
|
|
|
217 |
'".($mail[subject])."',
|
|
|
218 |
'".($mail[from])."',
|
|
|
219 |
'".($mail[header_add])."',
|
|
|
220 |
'".($mail[text])."',
|
|
|
221 |
'".($mail[takeoff])."',
|
|
|
222 |
NOW(),
|
|
|
223 |
'".($mail[erstellt_von])."'
|
|
|
224 |
)
|
|
|
225 |
";
|
|
|
226 |
$result = mysql_query ($query_spool, $localhost_dbh) or die (mysql_errno().": ".mysql_error()."<hr>$query_spool<hr>");
|
|
|
227 |
}
|
|
|
228 |
header("Location: mailsent.php?count=".count($To));
|
|
|
229 |
} // end of if ($action)
|
|
|
230 |
|
|
|
231 |
$Verteiler=array();
|
|
|
232 |
$result = mysql_query ("SELECT * FROM Verteiler order by name") or die (mysql_errno().": ".mysql_error());
|
|
|
233 |
while($zeile=mysql_fetch_array($result))
|
|
|
234 |
{
|
|
|
235 |
$Verteiler[$zeile[ID]]=$zeile;
|
|
|
236 |
}
|
|
|
237 |
|
|
|
238 |
if (!$Verteiler_NR)
|
|
|
239 |
{
|
|
|
240 |
$Verteiler_NR = array_keys($Verteiler);
|
|
|
241 |
$Verteiler_NR = $Verteiler_NR[0];
|
|
|
242 |
}
|
|
|
243 |
?>
|
|
|
244 |
<html>
|
|
|
245 |
<head>
|
|
|
246 |
<title>Mail versenden</title>
|
|
|
247 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
248 |
<meta name="author" content="Webagentur Niewerth - www.weban.de">
|
|
|
249 |
<meta name="revisit-after" content="30 days">
|
|
|
250 |
<meta name="language" content="deutsch, de">
|
|
|
251 |
<meta name="distribution" content="global">
|
|
|
252 |
<meta name="robots" content="all">
|
|
|
253 |
<link rel=stylesheet type="text/css" href="../buttons.css">
|
|
|
254 |
<style type="text/css">
|
|
|
255 |
<!--
|
|
|
256 |
a { color: #<? echo $webs[font_color_rechts] ?>}
|
|
|
257 |
-->
|
|
|
258 |
</style>
|
|
|
259 |
<script type="text/javascript">
|
|
|
260 |
_editor_url = "../htmlarea/";
|
|
|
261 |
_editor_lang = "de";
|
|
|
262 |
</script>
|
|
|
263 |
<script type="text/javascript" src="../htmlarea/htmlarea.js"></script>
|
|
|
264 |
</head>
|
|
|
265 |
|
|
|
266 |
<body bgcolor="#<? echo $webs[bgcolor_seite] ?>" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10" text="#<? echo $webs[font_color_rechts] ?>">
|
|
|
267 |
<form method="post" action="#" enctype="multipart/form-data">
|
|
|
268 |
<table width="800" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
|
|
|
269 |
<tr>
|
|
|
270 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" colspan="2">Verteiler
|
|
|
271 |
senden: <input type="hidden" name="Verteiler_NR" value="<?=$_REQUEST[Verteiler_NR];?>"></td>
|
|
|
272 |
</tr>
|
|
|
273 |
<tr>
|
|
|
274 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">An:</td>
|
|
|
275 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
276 |
<?
|
|
|
277 |
$to=array();
|
|
|
278 |
//Jenachdem was im Redaktionssystem angegeben ist, werden mehr Infos geholt und später mit in $to gepackt
|
|
|
279 |
$grundfunktionen = explode(";", $web_rechte[mail_verteiler][versenden][grundfunktionen]);
|
|
|
280 |
$zusatzfelder = '';
|
|
|
281 |
foreach($grundfunktionen as $value){
|
|
|
282 |
if ($value)
|
|
|
283 |
{
|
|
|
284 |
$zusatzfelder .= ", $value";
|
|
|
285 |
}
|
|
|
286 |
}
|
|
|
287 |
$query="
|
|
|
288 |
SELECT DISTINCT
|
|
|
289 |
Logins.E_Mail,
|
|
|
290 |
MD5(Logins.E_Mail) as MD5
|
|
|
291 |
$zusatzfelder
|
|
|
292 |
FROM
|
|
|
293 |
Logins,
|
|
|
294 |
Logins_to_Verteiler
|
|
|
295 |
WHERE
|
|
|
296 |
Logins.ID = Logins_to_Verteiler.Logins
|
|
|
297 |
AND
|
|
|
298 |
Logins_to_Verteiler.Verteiler = '".$_REQUEST[Verteiler_NR]."'
|
|
|
299 |
ORDER BY
|
|
|
300 |
ID
|
|
|
301 |
";
|
|
|
302 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query<hr>");
|
|
|
303 |
$count = mysql_num_rows($result);
|
|
|
304 |
// Userdaten werden ins Array $to gepackt
|
|
|
305 |
while ($zeile=mysql_fetch_assoc($result))
|
|
|
306 |
{
|
|
|
307 |
if (preg_match("/^[A-Za-z0-9-_.+]+\@[A-Za-z0-9-_.+]+\.[A-Za-z]+$/", $zeile[E_Mail]) > 0)
|
|
|
308 |
{
|
|
|
309 |
$to[$zeile[MD5]][E_Mail]=$zeile[E_Mail];
|
|
|
310 |
//Jenachdem was im Redaktionssystem angegeben ist, werden mehr Infos geholt und später mit in $to gepackt
|
|
|
311 |
foreach($grundfunktionen as $value) {
|
|
|
312 |
$to[$zeile[MD5]][$value]=$zeile[$value];
|
|
|
313 |
}
|
|
|
314 |
}
|
|
|
315 |
}
|
|
|
316 |
?>
|
|
|
317 |
<textarea name="To" cols="100" rows="10"><?
|
|
|
318 |
foreach($to as $key => $value) {
|
|
|
319 |
$ausgabe = '';
|
|
|
320 |
foreach($value as $key2 => $value2) {
|
|
|
321 |
if ($value2)
|
|
|
322 |
{
|
|
|
323 |
$ausgabe .= "$value2;";
|
|
|
324 |
}
|
|
|
325 |
}
|
|
|
326 |
$ausgabe = substr($ausgabe, 0, strlen($ausgabe) - 1) . "|\n";
|
|
|
327 |
echo $ausgabe;
|
|
|
328 |
}
|
|
|
329 |
|
|
|
330 |
?></textarea>
|
|
|
331 |
<br>
|
|
|
332 |
Anzahl der ausgelesenen Empfänger: <?=count($to);?>
|
|
|
333 |
</td>
|
|
|
334 |
</tr>
|
|
|
335 |
<tr>
|
|
|
336 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">Absender:</td>
|
|
|
337 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><? echo nl2br($Verteiler[$Verteiler_NR][Absender]) ?></td>
|
|
|
338 |
</tr>
|
|
|
339 |
<tr>
|
|
|
340 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">Betreff:</td>
|
|
|
341 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><? echo nl2br($Verteiler[$Verteiler_NR][Betreff]) ?></td>
|
|
|
342 |
</tr>
|
|
|
343 |
<? if (!isset($web_rechte[mail_verteiler][versenden][html]))
|
|
|
344 |
{
|
|
|
345 |
?>
|
|
|
346 |
<tr>
|
|
|
347 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">Begrüssung:</td>
|
|
|
348 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><? echo nl2br($Verteiler[$Verteiler_NR][Begruessung]) ?></td>
|
|
|
349 |
</tr>
|
|
|
350 |
<?
|
|
|
351 |
}
|
|
|
352 |
?>
|
|
|
353 |
<tr>
|
|
|
354 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">Text:
|
|
|
355 |
(Plain) </td>
|
|
|
356 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
357 |
<textarea name="message[PLAIN]" cols="100" rows="10" wrap="OFF"></textarea>
|
|
|
358 |
</td>
|
|
|
359 |
</tr>
|
|
|
360 |
<tr>
|
|
|
361 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">Text:
|
|
|
362 |
(HTML) </td>
|
|
|
363 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
364 |
<textarea id=messageHTML name="message[HTML]" cols="200" rows="10" wrap="OFF"><?
|
|
|
365 |
if ($Verteiler[$_GET[Verteiler_NR]][Template_URL])
|
|
|
366 |
{
|
|
|
367 |
echo $Verteiler[$Verteiler_NR][Begruessung];
|
|
|
368 |
readfile($Verteiler[$_GET[Verteiler_NR]][Template_URL]);
|
|
|
369 |
echo $Verteiler[$Verteiler_NR][Schlusstext];
|
|
|
370 |
}
|
|
|
371 |
?></textarea>
|
|
|
372 |
<script type="text/javascript">
|
|
|
373 |
var config = new HTMLArea.Config();
|
|
|
374 |
with (config)
|
|
|
375 |
{
|
|
|
376 |
width = '650';
|
|
|
377 |
height = '500';
|
|
|
378 |
statusBar=false;
|
|
|
379 |
toolbar =
|
|
|
380 |
[
|
|
|
381 |
[
|
|
|
382 |
"fontname", "space", "fontsize", "space", "formatblock", "space",
|
|
|
383 |
"bold", "italic", "underline", "separator",
|
|
|
384 |
"strikethrough", "subscript", "superscript", "separator",
|
|
|
385 |
"copy", "cut", "paste", "separator", "undo", "redo"
|
|
|
386 |
],
|
|
|
387 |
[
|
|
|
388 |
"justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
|
|
|
389 |
"insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
|
|
|
390 |
"forecolor", "hilitecolor", "textindicator", "separator",
|
|
|
391 |
"inserthorizontalrule", "createlink", "insertimage", "htmlmode"
|
|
|
392 |
]
|
|
|
393 |
];
|
|
|
394 |
}
|
|
|
395 |
HTMLArea.replace("messageHTML",config);
|
|
|
396 |
</script>
|
|
|
397 |
</td>
|
|
|
398 |
</tr>
|
|
|
399 |
<? if (!isset($web_rechte[mail_verteiler][versenden][html]))
|
|
|
400 |
{
|
|
|
401 |
?>
|
|
|
402 |
<tr>
|
|
|
403 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="20%" valign="top">Schlusstext:</td>
|
|
|
404 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>"><? echo nl2br($Verteiler[$Verteiler_NR][Schlusstext]) ?></td>
|
|
|
405 |
</tr>
|
|
|
406 |
<?
|
|
|
407 |
}
|
|
|
408 |
?>
|
|
|
409 |
<script language="javascript">
|
|
|
410 |
function addAttach()
|
|
|
411 |
{
|
|
|
412 |
source=document.getElementById("attachment")
|
|
|
413 |
clone=source.cloneNode(true);
|
|
|
414 |
clone.removeAttribute("id");
|
|
|
415 |
|
|
|
416 |
source.parentNode.appendChild(clone);
|
|
|
417 |
}
|
|
|
418 |
|
|
|
419 |
function removeAttach(obj)
|
|
|
420 |
{
|
|
|
421 |
div = obj.parentNode;
|
|
|
422 |
td = obj.parentNode.parentNode;
|
|
|
423 |
|
|
|
424 |
if (!div.id)
|
|
|
425 |
{
|
|
|
426 |
td.removeChild(div);
|
|
|
427 |
}
|
|
|
428 |
}
|
|
|
429 |
</script>
|
|
|
430 |
<tr>
|
|
|
431 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" valign="top" width="20%">Attachments:</td>
|
|
|
432 |
<td bgcolor="#<? echo $webs[bgcolor_rechts] ?>">
|
|
|
433 |
<div id="attachment">
|
|
|
434 |
<input type="file" name="attach[]">
|
|
|
435 |
<input type="button" value="Add" onClick="addAttach()">
|
|
|
436 |
<input type="button" value="Remove" onClick="removeAttach(this)">
|
|
|
437 |
</div>
|
|
|
438 |
</td>
|
|
|
439 |
</tr>
|
|
|
440 |
<tr align="right">
|
|
|
441 |
<td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" colspan="2">
|
|
|
442 |
<input type="submit" name="action" value="Abschicken">
|
|
|
443 |
<input type="reset" value="Zurücksetzen">
|
|
|
444 |
</td>
|
|
|
445 |
</tr>
|
|
|
446 |
</table>
|
|
|
447 |
</form>
|
|
|
448 |
</body>
|
|
|
449 |
</html>
|