while($qw=mysql_fetch_array($ergebnis3))
{
$gemailt1 = ("SELECT email, auftrag_id FROM $gemailt WHERE email='$qw[mail]' AND auftrag_id='$id'");
$gemailt2=mysql_query($gemailt1, $db);
$numofrows = mysql_num_rows($gemailt2);
if (!$numofrows)
{
$eintrag1="INSERT into $gemailt (email, auftrag_id) values ('$qw[mail]', '$id')";
mysql_query($eintrag1, $db);
$anemail="$qw[mail]";
$anort="$qw[ort]";
$anid="$qw[memnum]";
$mailtext = str_replace("mgmail",$anemail,$mailtext);
$textmail = str_replace("mgmail",$anemail,$textmail);
$mailtext = str_replace("mgort",$anort,$mailtext);
$textmail = str_replace("mgort",$anort,$textmail);
$mailtext = str_replace("mgid",$anid,$mailtext);
$textmail = str_replace("mgid",$anid,$textmail);
if($mail_anrede=="1") {
$anrede = "$qw[anrede] $qw[vorname] $qw[name]";
}
elseif($mail_anrede=="2") {
$anrede = " Guten Tag $qw[anrede] $qw[name]";
}
elseif($mail_anrede=="3") {
$anrede = "Hallo $qw[anrede] $qw[name]";
}
elseif($mail_anrede=="4") {
$anrede = "Hallo $qw[vorname]";
}
else {
$anrede = ""; }
if($qw[html]=="1") {
$mailtext = str_replace("\"","'",$mailtext);
$mailtext = stripslashes($mailtext);
mail("$qw[mail]","$m_betreff","
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>
<title>test</title>
</head>
<font face='Verdana' size='2'>
$anrede<br><br>
$m_betreff<br><br>
$mailtext<br><br>","From: test <info@test.de>\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\nReply-To: fehler@test.de");
} else {
mail("$qw[mail]","$m_betreff","
$anrede
$m_betreff
$textmail","From: test <info@test.de>");
$mgmail="mgmail";
$mailtext = str_replace($anemail,$mgmail,$mailtext);
$textmail = str_replace($anemail,$mgmail,$textmail);
$mgort="mgort";
$mailtext = str_replace($anort,$mgort,$mailtext);
$textmail = str_replace($anort,$mgort,$textmail);
$mgid="mgid";
$mailtext = str_replace($anid,$mgid,$mailtext);
$textmail = str_replace($anid,$mgid,$textmail);
} } else { echo ""; } }
$start=("$start" + "500");
$bis=("$start" + "500");
if($start<=$anzahl) { ?>
<div align="center">
<form name="versand" method="post" action="mailen.php?data=sponsor">
<input type="hidden" name="zusatz" value="<? echo "$zusatz"; ?>">
<input type="hidden" name="start" value="<? echo "$start"; ?>">
<input type="hidden" name="ende" value="<? echo "$ende"; ?>">
<input type="hidden" name="id" value="<? echo "$id"; ?>">
<input type="hidden" name="anzahl" value="<? echo "$anzahl"; ?>">
<input type="hidden" name="mail_anrede" value="<? echo "$mail_anrede"; ?>">
<input type="hidden" name="er_zielgruppe" value="<? echo "$er_zielgruppe"; ?>">
<input type="hidden" name="er_geschlecht" value="<? echo "$er_geschlecht"; ?>">
<input type="hidden" name="er_alter" value="<? echo "$er_alter"; ?>">
<input type="hidden" name="er_familienstand" value="<? echo "$er_familienstand"; ?>">
<input type="hidden" name="er_kinder" value="<? echo "$er_kinder"; ?>">
<input type="hidden" name="er_beruf" value="<? echo "$er_beruf"; ?>">
<input type="hidden" name="er_einkommen" value="<? echo "$er_einkommen"; ?>">
<input type="hidden" name="er_plz" value="<? echo "$er_plz"; ?>">
<input type="hidden" name="er_land" value="<? echo "$er_land"; ?>">
<input type="hidden" name="m_betreff" value="<? echo "$m_betreff"; ?>">
<input type="hidden" name="mailtext" value="<? echo "$mailtext"; ?>">
<input type="hidden" name="textmail" value="<? echo "$textmail"; ?>">
<input type="hidden" name="m_link" value="<? echo "$m_link"; ?>">
<input type="hidden" name="time" value="<? echo "$time"; ?>">
<input type="hidden" name="bonis" value="<? echo "$bonis"; ?>">
<input type="submit" value="Email <? echo "$start"; ?> bis <? echo "$bis"; ?> senden">
</form>
</div>
<? } else {
$result = mysql_query("DELETE FROM $gemailt");
echo "Emails wurden erfolgreich versendet, Alle Email Adressen wurden aus dem Zwischenspeicher gelöscht"; }
[Editiert von novara am 26-01-2002 um 17:26]
{
$gemailt1 = ("SELECT email, auftrag_id FROM $gemailt WHERE email='$qw[mail]' AND auftrag_id='$id'");
$gemailt2=mysql_query($gemailt1, $db);
$numofrows = mysql_num_rows($gemailt2);
if (!$numofrows)
{
$eintrag1="INSERT into $gemailt (email, auftrag_id) values ('$qw[mail]', '$id')";
mysql_query($eintrag1, $db);
$anemail="$qw[mail]";
$anort="$qw[ort]";
$anid="$qw[memnum]";
$mailtext = str_replace("mgmail",$anemail,$mailtext);
$textmail = str_replace("mgmail",$anemail,$textmail);
$mailtext = str_replace("mgort",$anort,$mailtext);
$textmail = str_replace("mgort",$anort,$textmail);
$mailtext = str_replace("mgid",$anid,$mailtext);
$textmail = str_replace("mgid",$anid,$textmail);
if($mail_anrede=="1") {
$anrede = "$qw[anrede] $qw[vorname] $qw[name]";
}
elseif($mail_anrede=="2") {
$anrede = " Guten Tag $qw[anrede] $qw[name]";
}
elseif($mail_anrede=="3") {
$anrede = "Hallo $qw[anrede] $qw[name]";
}
elseif($mail_anrede=="4") {
$anrede = "Hallo $qw[vorname]";
}
else {
$anrede = ""; }
if($qw[html]=="1") {
$mailtext = str_replace("\"","'",$mailtext);
$mailtext = stripslashes($mailtext);
mail("$qw[mail]","$m_betreff","
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>
<title>test</title>
</head>
<font face='Verdana' size='2'>
$anrede<br><br>
$m_betreff<br><br>
$mailtext<br><br>","From: test <info@test.de>\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\nReply-To: fehler@test.de");
} else {
mail("$qw[mail]","$m_betreff","
$anrede
$m_betreff
$textmail","From: test <info@test.de>");
$mgmail="mgmail";
$mailtext = str_replace($anemail,$mgmail,$mailtext);
$textmail = str_replace($anemail,$mgmail,$textmail);
$mgort="mgort";
$mailtext = str_replace($anort,$mgort,$mailtext);
$textmail = str_replace($anort,$mgort,$textmail);
$mgid="mgid";
$mailtext = str_replace($anid,$mgid,$mailtext);
$textmail = str_replace($anid,$mgid,$textmail);
} } else { echo ""; } }
$start=("$start" + "500");
$bis=("$start" + "500");
if($start<=$anzahl) { ?>
<div align="center">
<form name="versand" method="post" action="mailen.php?data=sponsor">
<input type="hidden" name="zusatz" value="<? echo "$zusatz"; ?>">
<input type="hidden" name="start" value="<? echo "$start"; ?>">
<input type="hidden" name="ende" value="<? echo "$ende"; ?>">
<input type="hidden" name="id" value="<? echo "$id"; ?>">
<input type="hidden" name="anzahl" value="<? echo "$anzahl"; ?>">
<input type="hidden" name="mail_anrede" value="<? echo "$mail_anrede"; ?>">
<input type="hidden" name="er_zielgruppe" value="<? echo "$er_zielgruppe"; ?>">
<input type="hidden" name="er_geschlecht" value="<? echo "$er_geschlecht"; ?>">
<input type="hidden" name="er_alter" value="<? echo "$er_alter"; ?>">
<input type="hidden" name="er_familienstand" value="<? echo "$er_familienstand"; ?>">
<input type="hidden" name="er_kinder" value="<? echo "$er_kinder"; ?>">
<input type="hidden" name="er_beruf" value="<? echo "$er_beruf"; ?>">
<input type="hidden" name="er_einkommen" value="<? echo "$er_einkommen"; ?>">
<input type="hidden" name="er_plz" value="<? echo "$er_plz"; ?>">
<input type="hidden" name="er_land" value="<? echo "$er_land"; ?>">
<input type="hidden" name="m_betreff" value="<? echo "$m_betreff"; ?>">
<input type="hidden" name="mailtext" value="<? echo "$mailtext"; ?>">
<input type="hidden" name="textmail" value="<? echo "$textmail"; ?>">
<input type="hidden" name="m_link" value="<? echo "$m_link"; ?>">
<input type="hidden" name="time" value="<? echo "$time"; ?>">
<input type="hidden" name="bonis" value="<? echo "$bonis"; ?>">
<input type="submit" value="Email <? echo "$start"; ?> bis <? echo "$bis"; ?> senden">
</form>
</div>
<? } else {
$result = mysql_query("DELETE FROM $gemailt");
echo "Emails wurden erfolgreich versendet, Alle Email Adressen wurden aus dem Zwischenspeicher gelöscht"; }
[Editiert von novara am 26-01-2002 um 17:26]
Kommentar