1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
| <?php
error_reporting(E_ALL);
@include("../../../../../.connect.php");
$onderwerp = $_REQUEST["onderwerp"];
$email_id = $_REQUEST["email_id"];
$MyTextarea = $_REQUEST["MyTextarea"];
if ($onderwerp == ""){
echo "<html>
<head>
<title></title>
<link rel=\"stylesheet\" href=\"../../css_om.css\" type=\"text/css\">
</head>
<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><br>
<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"500\"><span class=\"kop\">Mailing > Invoer</span></td>
<td align=\"right\">
[img]\"../pics/vol.gif\"[/img]
[img]\"../pics/leeg.gif\"[/img]
[img]\"../pics/leeg.gif\"[/img]</td>
</tr>
</table><br>
U bent vergeten om een onderwerp in te voeren. <b><a href=\"javascript:history.back(1)\">Klik hier om terug te gaan.</a></b>
</body>
</html>";
exit;
}
else if ($MyTextarea == ""){
echo "<html>
<head>
<title></title>
<link rel=\"stylesheet\" href=\"../../css_om.css\" type=\"text/css\">
</head>
<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><br>
<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"500\"><span class=\"kop\">Mailing > Invoer</span></td>
<td align=\"right\">
[img]\"../pics/vol.gif\"[/img]
[img]\"../pics/leeg.gif\"[/img]
[img]\"../pics/leeg.gif\"[/img]</td>
</tr>
</table><br>
U bent vergeten om bij deze mailing tekst in te voeren. <b><a href=\"javascript:history.back(1)\">Klik hier om terug te gaan.</a></b></body>
</html>";
exit;
}
else {
if (!get_magic_quotes_gpc()) {
while (list($key,$value) = each($HTTP_POST_VARS)){
//$value = str_replace("\n","<BR>",$value);
//$value = nl2br($value);
$$key = addslashes($value);
}
while (list($key,$value) = each($HTTP_GET_VARS)){
//$value = str_replace("\n","<BR>",$value);
//$value = nl2br($value);
$$key = addslashes($value);
}
}
elseif (get_magic_quotes_gpc()) {
while (list($key,$value) = each($HTTP_POST_VARS)){
//$value = str_replace("\n","<BR>",$value);
//$value = nl2br($value);
$$key = ($value);
}
while (list($key,$value) = each($HTTP_GET_VARS)){
//$value = str_replace("\n","<BR>",$value);
//$value = nl2br($value);
$$key = ($value);
}
}
$query_check = "SELECT *
FROM mailing
WHERE mailing.onderwerp = '$onderwerp'";
$htekst = $MyTextarea;
//$tekst = str_replace("<BR>","",$htekst);
//$tekst = str_replace("<DIV></DIV>","",$htekst);
//$tekst = str_replace("\r","",$htekst);
//$tekst = str_replace("<DIV><DIV>","<DIV>",$htekst);
//$tekst = str_replace("</DIV></DIV>","</DIV>",$htekst);
//$tekst = str_replace("A href","A target=\"_blank\" href",$htekst);
$query1 = "insert into mailing (email_id,onderwerp,htekst) values ('$email_id','$onderwerp', '$htekst')";
$result1 = mysql_query($query1);
$email_id = mysql_insert_id();
}
//mail hier
$htekst = $MyTextarea;
$htekst = "".stripslashes($htekst);'
$tBody = "Geachte heer/mevrouw,
Hierbij ontvangt u onze nieuwsbrief.
Uw email programma ondersteunt geen HTML, om onze nieuwsbrief toch te kunnen bekijken, dient u op onderstaande link te klikken.
http://www.test.nl/nieuwsbrief.php?email_id=" .$email_id. "
Met vriendelijke groet,
Test";
$sBody = "<html>\r\n".
"<head>\r\n".
"<title>$onderwerp</title>\r\n".
"<style type=\"text/css\">
BODY {font-family:Arial, Helvetica, sans-serif; font-size:10pt}
DIV {color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:10pt}
TD {color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:10pt}
TR {color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:10pt}
TABLE {color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:10pt}
A {color:#E11111; font-family:Arial, Helvetica, sans-serif; font-size:10pt; text-decoration: none}
A:hover {color:#E11111; font-family:Arial, Helvetica, sans-serif; font-size:10pt; text-decoration: none}
</style>\r\n".
"</head>\r\n".
"<body>\r\n".
"<table width=\"780\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<th height=\"149\" align=\"left\" valign=\"top\" scope=\"col\">[img]\"http://www.test.nl/afbeeldingen/top_nieuwsbrief.gif\"[/img]</th>
</tr>
<tr>
<td valign=\"top\" background=\"http://www.test.nl/afbeeldingen/bg_nieuwsbrief.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<th width=\"150\" scope=\"col\"> </th>
<th align=\"left\" scope=\"col\">$htekst<br /></th>
</tr>
</table></td>
</tr>
<tr>
<td height=\"16\" bgcolor=\"#8F8F8F\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
</table></td>
</tr>
</table>\r\n".
"</body>\r\n".
"</html>\r\n".
"\r\n";
$mailingbericht = '
boundary="----=_NextPart_000_002C_01BFABBF.4A7D6BA0"
------=_NextPart_000_002C_01BFABBF.4A7D6BA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
$tbody
------=_NextPart_000_002C_01BFABBF.4A7D6BA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
$sBody
------=_NextPart_000_002C_01BFABBF.4A7D6BA0-- ';
// ontvangers
$ontvanger2 .= "Nieuwsbrief Test <test@test.nl>";
// onderwerp
$onderwerp2 .= "$onderwerp";
// bericht
$bericht2 = "$mailingbericht";
$headers2 .= "From: Test<webmaster@test.nl>\n";
$headers2 .= "Reply-To: Test<test@test.nl>\n";
//$headers2 .= "BCC: Nieuwsbrief<test@test.nl>\n";
$headers2 .= "Content-Type: multipart/alternative; charset=iso-8859-1\n";
$headers2 .= "MIME-Version: 1.0\n";
$headers2 .= "Return-Path: Test<test@test.nl>\n";
$headers2 .= "Precedence: Bulk\n";
mail($ontvanger2, $onderwerp2, $bericht2, $headers2) or die(error);
echo "<html>
<head>
<title></title>
<link rel=\"stylesheet\" href=\"../../css.css\" type=\"text/css\">
</head>
<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><br>
<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"500\"><span class=\"kop\">Mailing > Invoer</span></td>
<td align=\"right\">
[img]\"../pics/vol.gif\"[/img]
[img]\"../pics/vol.gif\"[/img]</td>
</tr>
</table><br>
Uw mailing is verstuurd en toegevoegd aan de database.
</body>
</html>";
exit;
?> |