"; $errmsg.=""; $errmsg.="$l_nocatselected"; $errors=1; } if($errors==1) { include_once('./includes/head.inc'); ?> "; echo ""; echo "$l_back"; echo ""; include_once('./includes/footer.inc'); exit; } for($i=0;$iCould not connect to the database."); if($myrow=mysql_fetch_array($result)) { $catsql="select * from ".$tableprefix."_categories where catnr=".$myrow["category"]; if(!$catresult = mysql_query($catsql, $db)) die("Could not connect to the database."); if($catrow=mysql_fetch_array($catresult)) { $catname=stripslashes($catrow["catname"]); $tmpsql2="select * from ".$tableprefix."_catnames where catnr=".$catrow["catnr"]." and lang='".$act_lang."'"; if(!$tmpresult2=mysql_query($tmpsql2,$db)) die("Unable to connect to database.".mysql_error()); if($tmprow2=mysql_fetch_array($tmpresult2)) { if(strlen($tmprow2["catname"])>0) $cattext=stripslashes($tmprow2["catname"]); } } else $catname=$l_unknown; $confirmurl=$simpnews_fullurl."subscription.php?$langvar=$act_lang&mode=remove&email=".$myrow["email"]."&id=".$myrow["unsubscribeid"]; $tmpsql="select * from ".$tableprefix."_texts where textid='musnot' and lang='".$myrow["language"]."'"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Could not connect to the database."); if($tmprow=mysql_fetch_array($tmpresult)) { $mailmsg=stripslashes($tmprow["text"]); $mailmsg=undo_htmlspecialchars($mailmsg); $mailmsg_html=stripslashes($tmprow["text"]); } else { $mailmsg = $l_munsubscriptionconfirmmail; $mailmsg_html = $l_munsubscriptionconfirmmail_html; } $mailmsg = str_replace("{catname}",$catname,$mailmsg); $mailmsg = str_replace("{sitename}",$sitename,$mailmsg); $mailmsg = str_replace("{confirmurl}",$confirmurl,$mailmsg); $mailmsg.= "\n\n---\n$defsignature\n\n\n"; $mailmsg = str_replace("\n",$crlf,$mailmsg); $mailmsg_html = str_replace("{catname}",$catname,$mailmsg_html); $mailmsg_html = str_replace("{sitename}",$sitename,$mailmsg_html); $mailmsg_html = str_replace("{confirmurl}",$confirmurl,$mailmsg_html); $mailmsg_html.= "\n\n
\n$defsignature\n\n\n"; $mailmsg_html = str_replace("\n","
".$crlf,$mailmsg_html); $mailmsg_html = undo_htmlspecialchars($mailmsg_html); $subject = $l_unsubscriptionconfirmsubject; $subject = str_replace("{sitename}",$sitename,$subject); if($simpnewsmailname) $fromadr="\"$simpnewsmailname\" <$simpnewsmail>"; else $fromadr=$simpnewsmail; $mail = new htmlMimeMail(); $mail->setCrlf($crlf); $mail->setTextWrap($mailmaxlinelength); $mail->setTextCharset($contentcharset); if($myrow["emailtype"]==0) { $mail->setHTMLCharset($contentcharset); $mail->setHTML($mailmsg_html,$mailmsg); } else { $mail->setText($mailmsg); } $mail->setSubject($subject); $mail->setFrom($fromadr); $receiver=array(); array_push($receiver,$myrow["email"]); if(!$insafemode) @set_time_limit($msendlimit); if($use_smtpmail) { $mail->setSMTPParams($smtpserver,$smtpport,NULL,$smtpauth,$smtpuser,$smtppasswd); $sendresult=$mail->send($receiver, "smtp"); } else $sendresult=$mail->send($receiver, "mail"); do_emaillog($sendresult,$myrow["email"],"unsubscribe newsletter (nlmaint)"); } } $redirect=1; include_once('./includes/head.inc'); ?> "; echo ""; echo "$l_unsubscribesent"; if($subredirecturl) $backurl=$subredirecturl; else if(!isset($backurl)) { if(!isset($category)) $category=0; $backurl="news.php?$langvar=$act_lang&layout=$layout&category=$category"; } if($redirectdelay>=0) { echo ""; echo ""; echo "$l_redirected"; } echo ""; echo ""; echo "$l_news"; echo ""; include_once('./includes/footer.inc'); exit; ?>